Answer Posted / chaitanya
throws clause is used when the programmer does not want to
handle the exception and throw it out of a method.throw
class is used when the programmer wants to throw an
exception explicitly and wants to handle it using catch
block.hence ,throws and throw are contradictory.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is strings in java?
What is meant by method overriding?
What is the final field modifier?
What is outofmemoryerror in java?
Explain the difference between treeset and treemap in java?
How do you sort arrays in java?
How to use arraylist in java netbeans?
Objects or references which of them gets garbage collected?
Explain the use of shift operator in java. Can you give some examples?
What is static in java?
Define the term string pool?
What are parameters in a method?
How many ways can we create singleton class?
What are the types of collections in java?
What is the differences between heap and stack memory in java? Explain