what is difference between throw and throws in exception?
Answer Posted / ritesh
Throw :- It is possible for your program to throw an
exception explicitly, using the throw statement.
Throws :- If a method is capable of causing an exception
that it does not handle, it must specify this behavior so
that callers of the method can guard themselves against that
exception.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
'A class is a template for an object' explain this statement.
Can you access the private method from outside the class?
What is the use of set in java?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
describe synchronization in respect to multithreading? : Java thread
What are the library functions in java?
Explain access modifiers in java.
What is super?
Why arraylist is not synchronized in java example?
What is locale in java?
How do you add an element to a set in java?
What happens when a thread cannot acquire a lock on an object in java programming?
Which methods cannot be overridden in java?
What are measurable parameters?
What are wrapped classes in java programming?