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

Why for each loop is used?

508


What is xslt in java?

527


How do you access command-line arguments within the code?

574


What is an object’s lock and which object’s have locks?

509


Do you know how to reverse string in java?

588






What should I import for arraylist in java?

512


What is the difference between the size and capacity of a vector?

571


What is hashmap and map?

563


What is pass by value?

516


Is alive method in java?

508


Explain java coding standards for interfaces?

636


Explain about member inner classes?

594


What is an object's lock and which object's have locks in java programming?

572


Where is the find and replace?

538


What are the parts of a method?

539