what is difference between throw and throws in exception?
Answer Posted / pavithra
throws is used to throw an exception from the method
without handling that exception where as 'throw' is used
to throw the exception to catch block and handle it.
| Is This Answer Correct ? | 123 Yes | 79 No |
Post New Answer View All Answers
Which class represents the socket that both the client and server use to communicate with each other?
Why are generics used?
What is numel matlab?
What is size of int in java?
Can java hashmap have duplicate keys?
Is logger a singleton?
Why is static used?
What are namespaces in java?
Write a program to print count of empty strings in java 8?
What is the static method?
What is difference between local variable and global variable?
Explain the importance of finally block in java?
Why java is not 100% object-oriented?
Are variables stored in ram?
What are the problems faced by java programmers who don't use layout managers?