What is the difference between throw and throws?

Answer Posted / swapna kumari arava

By Using throw , we can create our own exceptions or user
defined exceptions and we can thorw , where as throws
defines the list of exceptions to be thown by the method.

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a ternary operator in java? What is an interface?

553


What is data member in java?

505


What is the base class of all classes?

571


what do you mean by classloader?

555


How do you remove duplicates in java?

528






What is the program compilation process?

587


What is the size of arraylist in java?

608


What is difference between class and object in java?

531


Should a main method be compulsorily declared in all java classes?

535


Explain the differences between abstraction and encapsulation?

522


What is the disadvantage of java?

508


Can constructor be protected in java?

512


What is illegal identifier in java?

538


How can constructor chaining be done using this keyword?

589


What do you meant by active and passive objects?

611