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 happens when heap memory is full?

720


What is a method header?

749


What is the class in java?

752


What are access specifiers available in java?

774


What is a treemap in java?

731


What are the three best choices for a development environment?

842


Tell me the Importent classes in net package?

1749


What is the difference between the direct buffer and non-direct buffer in java?

762


Can we cast any other type to boolean type with type casting?

717


What do you mean by aggregation?

792


When should we create our own custom exception classes?

770


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

778


What is java util collection?

751


What is the use of singleton?

709


What is double in java?

713