what difference between throw and throws in exception
handling.

Answer Posted / sidd

In case of java if any error occur deuring the exicution
time throw is use to throwing that that into our catch block
for handling and in case of throws if any error
will occur throws can handle that error.

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 difference between variable & constant?

541


What are encapsulation, inheritance and polymorphism?

531


Is static a singleton?

523


What do you mean by order of precedence and associativity?

546


extending thread class or implementing runnable interface. Which is better? : Java thread

563






Why java is considered as platform independent?

591


How would you convert bytes to string?

563


What is ‘has a’’ relationship in java?

724


What is floor math?

515


Can we overload the constructors?

558


What happens if main method is not static?

495


What is meant by call by reference?

510


What’s a deadlock?

609


How does a for loop work?

508


Is string passed by reference in java?

548