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


Please Help Members By Posting Answers For Below Questions

Is string is a class in java?

525


What happens when I use / and % with a negative numerator?

536


What is the use of inner class?

545


What are the new features in java 8?

572


What is finally and finalize in java?

594






Why java is platform independent? Explain.

601


What is the generic class?

533


What is class and object in java?

557


What happens when heap memory is full?

528


What is immutable in java?

544


Write a program to find the greatest of three numbers in java?

563


What are computer functions?

481


Is void a return type?

555


How to provide security in java

1805


What is ascii code?

644