What is the difference between throw and throws?

Answer Posted / neeraj kumar singh

When we wants to throw an exception explicitly in the program use the throw keyword.Whether a throws keyword is used when a system throws an exception itself.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you decide when to use arraylist and linkedlist?

535


What is a get method?

535


how to create multithreaded program? : Java thread

509


What's the default access specifier for variables and methods of a class?

517


How to provide security in java

1805






What is the advantage of functional interface in java 8?

525


What is generic type?

574


What is :: operator in java?

511


When will we use them?

599


Is arraylist ordered?

564


What is difference between filereader and bufferedreader?

537


How do you use find and replace?

514


What is the difference between a switch statement and an if statement?

517


What is arguments in java?

524


When parseint method can be used?

543