what is difference between throw and throws in exception?

Answer Posted / ramya

throw - used to handle user-defined exception
throws -jvm(java virtual machine) going to take all exception

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java util list serializable?

543


What is the primary benefit of encapsulation?

562


What is keyword and identifier?

645


What is double data type?

541


Explain purpose of sleep() method in java?

623






Can we sort list in java?

608


what is the significance of listiterator in java?

624


What are measurable parameters?

571


What is difference between fileinputstream and filereader in java?

565


What is the numeric promotion?

508


Which variables are stored in stack?

453


What is java util function?

519


What is java life cycle?

541


How do you start a new line in java?

523


What is the importance of main method in Java?

577