What is the difference between throw and throws?

Answer Posted / ravikiran

throw will declare an exception
throws will throw the exception to the calling method

Is This Answer Correct ?    16 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is indexof in java?

730


What does int argc char * argv [] mean?

711


What is java regex?

724


Can a final variable be initialized in constructor?

684


What is purpose of find feature?

825


What is data type modifier?

705


How strings are created in java?

787


What is wrapper class example?

724


What do you mean Abstraction in java?

800


What are variable names?

700


What is class and object in java?

744


whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net

1864


When should I use singleton?

690


What is the functionality of the stub?

776


How is a structure different from array ?

767