what is difference between throw and throws in exception?

Answer Posted / prabakar

throw:
raised the exception which are occured as a method body.

Throws:
it's the communication bridge between calling function and called function.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the null?

542


What happens if a constructor is declared private?

539


What is a get method?

537


Which of the following is not an isolation level in the JDBC

1613


Why main method is static in java?

598






How to compare strings in java?

508


What do you understand by casting in java language?

580


What is string in java? String is a data type?

581


Can you explain the private protected field modifier?

574


What is the basic concept of java?

543


What is contract between hashcode and equal method?

574


What is this keyword used for?

695


What is token in java?

535


What is byte [] in java?

540


What is gc()?

585