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

Is int a class in java?

537


Define a java class.

811


What is the original name of java?

553


What does arrays sort do in java?

551


What is a treeset in java?

552






Why java is secure? Explain.

611


Is it possible to instantiate the abstract class?

546


Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

642


What is java dot?

503


When do we use synchronized methods in java?

592


What is the use of beaninfo?

593


What is difference between local variable and global variable?

483


What is mvc in java?

568


Can we use both this () and super () in a constructor?

560


What is synchronization and why is it important in java programming?

478