Nullpointer exception is a very common exception. Why is it
not made as a checked exception?

Answers were Sorted based on User's Feedback



Nullpointer exception is a very common exception. Why is it not made as a checked exception?..

Answer / 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

Nullpointer exception is a very common exception. Why is it not made as a checked exception?..

Answer / ajay kumar sharma

When a null value is passed to a method or a method
receieve null(nothing) value either a run time or vice-
versa, JRE or method will throw a nullpointer exception.

It is java's buit-in exception thrown at relevant time.

Is This Answer Correct ?    0 Yes 8 No

Post New Answer

More Core Java Interview Questions

What is the Scope of Static Variable?

0 Answers   Verifone,


Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?

2 Answers   ADP,


While opening the file, what type of exceptions can be caught?

3 Answers  


Howmany number of objects we can store in an ArrayList. Is there any limit?

7 Answers   TCS,


What is purpose of applet programming?

0 Answers  






What are the different types of multitasking?

0 Answers  


What is the benefit of inner classes in java?

0 Answers  


Explain about interrupt() method of thread class ?

0 Answers  


Can Anybody tell the diff b/w jdk1.6 and latest version.

2 Answers  


Java support call by reference (pass by reference) ?

1 Answers   HCL,


What is exception propagation?

0 Answers  


What is difference between == equals () and compareto () method?

0 Answers  


Categories