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 purpose of using bufferedinputstream and bufferedoutputstream classes?

561


What is difference between classpath and path variables in java?

565


Can we declare register variable as global?

519


What are the main uses of java?

535


What is charat java?

547






Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

661


In java how do we copy objects?

559


Is array size fixed in java?

549


What are the different types of sorting in java?

542


What do you mean by constructor?

557


What are the different types of java?

561


What is final, finally, finalize?

607


Can java program run without jre?

575


Is java programming easy?

545


What are the two environment variables that must be set in order to run any java programs?

537