what is difference between throw and throws in exception?

Answer Posted / velayutham

throw- means user defined exception. we want throw manually
throw the exception.
throws- means jvm going to take all exception.

Is This Answer Correct ?    33 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is internal variable?

537


What is immutable class in java?

509


What does void * mean?

529


Is java util regex pattern thread safe?

516


Is list ordered in java?

540






What are nested classes in java?

600


Explain the difference between abstract class and interface in java?

535


Can a set contain duplicates?

515


What is the purpose of static methods and variables?

529


Write a program to solve producer consumer problem in java?

566


How do you sort objects in java?

513


What is an arraylist in java?

517


How you can force the garbage collection?

535


What will happen when using pass by reference in java?

520


Difference between Linked list and Queue?

605