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

Can a static member function access member variable of an object?

554


What will happen if a thrown exception is not handled?

557


List types of storage classes in java?

615


Why strings in java are called as immutable?

589


Write a program to search a number in the given list of numbers.

625






What does the “final” keyword mean in front of a variable? A method? A class?

542


What is anagram in java?

512


How do you clear a list in java?

595


Write a program in java to establish a connection between client and server?

503


What is the difference between preemptive scheduling and time slicing?

582


What is difference between ++ I and I ++ in java?

524


Can we override the static methods?

565


What is meant by oops concept in java?

500


What is the null?

538


What is number data type in java?

548