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
When do I need to use reflection feature in java?
What is the benefit of singleton pattern?
What are methods and how are they defined?
What is java instanceof operator?
What is hashtable and explain features of hashtable?
Explain garbage collection in java?
Is it safe to install java on my computer?
How objects are stored in java?
What is purpose of keyword void?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
Is minecraft 1.15 out?
How do you remove duplicates in java?
What is an association?
What is set in java?
What is tochararray in java?