what is difference between throw and throws in exception?
Answer Posted / lokesh
throws is used for throwing an exception from a method to
jvm, the jvm should handle it.where us throw is used when
user needs to raise his own exception.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What are conditionals and its types?
What are inner classes or non static nested classes in java?
What is subsequence of a string?
What are untrusted applets?
What is arrays sort in java?
How to store image in arraylist in java?
What are the states of thread in java?
How will you reverse a singly-link list?
What is int short for?
What is structure of java heap? What is perm gen space in heap?
What is the purpose of using java.lang.class class?
How does the java compiler work?
What is parameters example?
Do I need java on my computer?
Can static method access instance variables ?