what is difference between throw and throws in exception?

Answer Posted / bhavannarayana ch

To handover an Exception object to the JVM Programatically by using the "throw"

To delegate the responsibility of Exception handling to the caller by using "throws"

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 stack class in java?

548


What is the difference between hashmap and hashtable? What is an interface?

513


explain the concept of virtual method invocation in polymorphism in detail?

1722


How many digits can a float hold?

539


Can we have any other return type than void for main method?

542






why not override thread to make a runnable? : Java thread

561


Garbage collection in java?

599


How static variable work in java?

602


What is regex in java?

531


What is the difference between abstract class and interface1? What is an interface?

566


Is object a data type in java?

597


What is array list in java?

593


I want to store more than 10 objects in a remote server? Which methodology will follow?

2638


What is keyword and identifier?

645


What is an eror in java?

561