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 request processor?

1 Answers   Virtusa,


What is boolean keyword in java?

0 Answers  


What is object data type?

0 Answers  


What is floor math?

0 Answers  


Can you override static method in java?

1 Answers  


What is the use of a copy constructor?

0 Answers   Flextronics,


Is it safe for adding 10,00,000 records/objects to HashMap?, i.e is it safe to add millions of objects to HashMap?

2 Answers  


Difference between arraylist and vector.

0 Answers  


Difference between static synchronization vs. Instance synchronization?

0 Answers  


What is the default modifier in Interface?

5 Answers  


why we write public static void main (String args[]) in core java plz explain briefly??????????????????

3 Answers   HCL,


What is length in java?

0 Answers  


Categories