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 are synchronized methods and synchronized statements in java programming?

568


What are "class access modifiers" in Java?

604


Why is it called boolean?

519


What is tochararray in java?

494


What is math in java?

560






what type of questions asked for barclays technologies pune please send urgent

5224


What is anagram of a string?

513


Where pragma is used?

594


What is difference between variable declaration and definition?

507


Why we cannot override static method?

552


Write code of any action class?

544


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

1529


What is double checked locking in singleton?

604


What is the null?

533


what are abstract functions?

557