what is difference between throw and throws in exception?

Answer Posted / pavithra

throws is used to throw an exception from the method
without handling that exception where as 'throw' is used
to throw the exception to catch block and handle it.

Is This Answer Correct ?    123 Yes 79 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between java and java ee?

777


Which is bigger float or double?

773


What does indexof return in java?

765


What is a boolean flag in java?

786


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

1606


What are packages in java?

956


What is multiple inheritance? Is it supported by java?

742


What is the difference between Java1.4 and Java1.5

2078


What is dynamic binding(late binding)?

814


What is the main function in java?

821


Explain about exception propagation?

777


Why do we use regex?

777


What is use of inner class in java?

772


Can we create an object of private class?

757


Is null a keyword in java?

751