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

Can we access a database using applets?

2 Answers   Hewitt,


can any body tell me? does advance java and j2ee both are same.

4 Answers   CTS, Infosys,


What is the difference between static (class) method and instance method?

0 Answers  


Can you achieve runtime polymorphism by data members?

0 Answers  


If a variable is declared as private, where may the variable be accessed?

0 Answers  






when i write string s1="java"; in one program(application) and string s2="java"; in another application on the same jvm will both objects s2,s2 will refer to same memory location where "java" is stored in string pool.

2 Answers  


Tell me are there implementations for sorting and searching in the java libarary?

0 Answers  


How many types of design patterns are there?

0 Answers  


Can we have a try block without catch block?

0 Answers  


how to create constants in java?

0 Answers  


what do you meant by Platform-Independent?

6 Answers   Persistent,


How does static modifier work?

1 Answers   Wipro,


Categories