What is meant by throwing an Exception?

Answer Posted / jagadeesh

throwing the exception is nothing but collect all the error
releated info into the single and throw that objet into the
caller area

it contains all exception releated info
And most importantly it is the responsibility of the caller
to handle the exception by using try , catch blocks

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between assignment and initialization?

558


What is the main use of java?

571


Define how objects are stored in java?

565


What is user defined exception in Java?

615


What is tcp ip in java?

589






Which arithmetic operations can result in the throwing of an arithmeticexception?

597


Explain how hashmap works?

591


Explain parallel processing in java8?

637


What are the pillars of java?

489


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

542


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

638


Is java a utf 8 string?

530


Can a final variable be null?

546


Differentiate between static and non-static methods in java.

569


Explain the difference between intermediate and terminal operations in java8?

568