what is the Use of throws exception?

Answers were Sorted based on User's Feedback



what is the Use of throws exception?..

Answer / ravikiran(aptech mumbai)

throws is used to throw the exception to it's calling method

Is This Answer Correct ?    14 Yes 3 No

what is the Use of throws exception?..

Answer / niranjanravi

it is used to throw the list of exceptions that a method
has to throw.
Syntax:
returntype methodname(list of args)throws
exception1,exception2{
body
}

Is This Answer Correct ?    15 Yes 6 No

Post New Answer

More Core Java Interview Questions

Explain a few methods of overloading best practices in java?

0 Answers  


What do you mean by boolean?

0 Answers  


How do you get the length of a string in java?

0 Answers  


Why is java not 100% pure oops?

0 Answers  


What is the purpose of default constructor?

0 Answers  






How to avoid the runtime exception ?

2 Answers  


How many characters is 2 bytes?

0 Answers  


What is a stack class in java ?

0 Answers   Akamai Technologies,


What is meant by Java ?

2 Answers   CMC, Infosys,


What is variable and rules of variable?

0 Answers  


What is array list in java?

0 Answers  


Can a private method be declared as static?

0 Answers   Global Logic,


Categories