Nullpointer exception is a very common exception. Why is it
not made as a checked exception?
Answer Posted / ravi jain
when some operation is done with an object which is not
initialized i.e. object is "null" than NullPointerException
occurs.
This exception is in category of unchecked exceptions because
instance are not available at compile time so how complier checks whether object is null or instantiated, so it is
treated as unchecked exception.
| Is This Answer Correct ? | 18 Yes | 0 No |
Post New Answer View All Answers
What do you mean by constructor?
Why do we override tostring method in java?
What is the intersection and union methods?
List down the methods and interfaces of collection class in java.
What is a priority queue java?
What does microservices mean?
Why packages are used?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
Can we define static methods inside interface?
What modifiers are allowed for methods in an interface?
Explain the Propertie sof class?
How many types of operators are there?
Explain, java is compatible with all servers but not all browsers?
What is the difference between state-based unit testing and interaction-based unit testing?
What is the generic class?