Explain importance of throws keyword in java?



Explain importance of throws keyword in java?..

Answer / Sachin Varshney

The 'throws' keyword is important in Java as it allows a method to indicate that it may throw an exception. This enables the calling method to decide whether it can handle the exception or needs to pass it on to another method.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can a method inside a interface be declared as final?

1 Answers  


Why do we need array in java?

1 Answers  


Is set thread safe java?

1 Answers  


What is the static import?

1 Answers  


What does java se mean?

1 Answers  


Is there memory leaks in java?

3 Answers  


Is arraylist an object in java?

1 Answers  


they asked class A{} class B{} class c{} all the three class saved as a single file,there is no main method in the file and anothe class M.java class m { psvm(String args[]) { // here the parent class can access } }

2 Answers   DNS, IPSR Solutions,


What are the Class Libraries ?

1 Answers   Wipro,


Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in reverse order.

4 Answers  


Explain about serializable interface in java?

1 Answers  


What is JVM and is it platform independent?

1 Answers  


Categories