what is the difference between through and throws?

Answer Posted / sharad

I think it's not through but throw. So the question is what is the difference between throw and throws?
Ans. Throw is used to through an exception and throws is used to declare in the method beginning that this method can throw an unchecked exception and which it does not handle.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is deque in the java collections framework? : java collections

734


What are the differences between the java collection and the java list? : java collections

807


How is hashset maintained in memory by java ?

839


What are the types of the main implementing classes in the map interfaces? : java collections

843


What are the different types of ways where you can iterate over a list? : java collections

753


What are the types of java collections? : java collections

734


How do I find jre path in windows?

737


What are the uses of the set interfaces in the java collections? : java collections

749


What is the use of the list interface in the java collection? : java collections

790


What do you understand by synchronization? Why is it important?

785


What is an algorithm in java collection framework? : java collections

805


What are the different types of classes implemented in the set interfaces? : java collections

828


Should we create system software ( e.g operating system ) in java ?

787


Which interface does java.util.hashtable implement?

912


What are the queues in the java collection framework? : java collections

744