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

What is the default size of arraylist in java?

501


How do you clear an arraylist in java?

494


I want to re-reach and use an object once it has been garbage collected. How it's possible?

533


What is a protected class in java?

537


What is pre increment and post increment in java?

496






How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

553


How do you join strings in java?

522


Is jdk required on each machine to run a java program?

748


What is difference between path and classpath variables?

564


What do you mean by byte code?

505


Explain java coding standards for methods?

601


Is char a data type in java?

540


What is an 8 bit word?

591


Can we call the run() method instead of start()?

589


What is increment in java?

523