what is difference between throw and throws in exception?

Answer Posted / srinath

throws keyword is used 2 delegate the responsibility of
exception handling 2 caller method where as throw keyword
used 2 hand over the creted customised excetion object 2
jvm 2 handle the excepion.

Is This Answer Correct ?    33 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between error and an exception?

567


What is a bufferedreader?

523


Describe what happens when an object is created in java ?

545


When do we use hashset over treeset?

531


What is difference between java and java ee?

555






Explain the difference between throw and throws in java?

546


What is high level language in computer?

536


Give us a program to check for parenthesis matching using stack.

555


What is serialization in java?

560


What do you mean by mnemonics?

530


Why you should not use singleton?

539


What is meant by collection in java?

547


Is arraylist ordered?

563


What is the console in java?

674


what happens when a thread cannot acquire a lock on an object? : Java thread

536