what difference between throw and throws in exception
handling.

Answer Posted / narayana reddy

throws indicates what type of exception is thrown by
a particular function, where as throw is used to through
user defined exceptions

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is meant by HQL?

639


What are 5 boolean operators?

618


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

573


When does a class need a virtual destructor?

530


Explain about exception propagation?

585






What is better - 'bit-shift a value' or 'multiply by 2'?

701


What is the difference between the boolean & operator and the && operator in java programming?

564


What are different types of states exist for a thread?

551


How to use arraylist in java netbeans?

510


Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

635


Can you use this() and super() both in a constructor?

522


How can the checkbox class be used to create a radio button?

509


Why Java doesn’t support multiple inheritance?

633


What is a line separator in java?

537


Can we have multiple classes in a single file?

512