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

What is constant in programming?

0 Answers  


What is a byte array?

0 Answers  


Where are variables stored?

0 Answers  


List methods available in Java Queue interface

1 Answers  


why we are calling j2se why not j1se or j3se or j4se..etc is there any reason.. can u please explain it... i shocked in my interview when they asked this question please explain ans

2 Answers   Infosys,






what is difference between global methods and local methods?

1 Answers  


What is an object’s lock and which object’s have locks?

0 Answers  


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

0 Answers   Genpact,


What is an abstract class?

7 Answers   DBS, Wipro,


Diff between C++ and java?

9 Answers   TCS,


What is overriding in java?

0 Answers  


when should you use stringbuilder class in a program?

0 Answers  


Categories