what is the Use of throws exception?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a parameter in java?

542


Write a method to check if input string is palindrome?

579


What is static import in java?

527


What are the two environment variables that must be set in order to run any java programs?

523


What is difference between filereader and bufferedreader?

527






What does provide mean construction?

550


What are daemon Threads in java?

606


Is hashset ordered?

547


Discuss different types of errors that generally occur while programming.

571


What is the purpose of the strictfp keyword?

607


State the difference between creating string as new () and literal.

519


Is java jre still free?

524


What is an i/o filter?

563


What is flush buffer?

516


Which java ide is used the most?

505