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
What is args length in java?
Define an enumeration?
Why isn’t there operator overloading?
Write code to implement bubble sort in java?
What is volatile data type?
Give any two differences between C++ and java.
How do you identify independent and dependent variables?
What type of value does sizeof return?
What are pass by reference and pass by value?
What is continuity of a function?
Difference between ‘is-a’ and ‘has-a’ relationship in java?
when you will synchronize a piece of your code? : Java thread
what is the difference between thread and runnable types? : Java thread
How does map works in java?
how can i use a nonsynchronized hashtable?