why do some methods throw exceptions and how the calling method handles those exceptions?
If the checked exceptions are thrown then what would happen?
Also if unchecked exceptions are thrown then what would happen?
How do i know my method can throw exception and i should include throws statement.
Also please give me the real world example of throwing exception.
Please explain me in detail the concept of throwing exceptions using example.