When does Exception occurs?

Answer Posted / shakir khan

Exception is a condition that occur because of bad input
etc.
For example

FileNotFoundException will takesplace if the specified file
does not exist.

NullPointerException will be thrown if you try using a null
reference.

In most of the cases it is possible to recover from an
exception.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How objects of a class are created if no constructor is defined in the class?

573


what is difference between equals and ==?

580


What is contract between hashcode and equal method?

562


what is object-oriented programming in java?

581


Explain about narrowing conversion in java?

562






What is instance means in java?

558


Why can we not override static method?

583


What is pangram in java?

505


How do you create a reference in java?

506


What are some alternatives to inheritance?

551


How many functional interfaces does java 8 have?

594


What is the basic of java?

560


Where can I find jdk in my computer?

457


What is the java reflection api? Why it’s so important to have?

548


What does localhost mean?

486