What is NullPointerException in Java how to deal
Advertisements
| Top Tutorials | New Tutorials | Submit | Login | Register |
Tutorial Detail
What is NullPointerException in Java how to deal
Java.lang.NullPointerException comes when we try to access any field or method on Object which is null. Its come mainly due to programming mistake andhttp://javarevisited.blogspot.sg/2012/06/common-cause-of-javalangnullpointerexce.html
Total Hits: 6332
Total Votes: 42 votes
Category: JAVA/Core JAVA
Submitted on: 2012-09-22 08:32:16
Submitted By: Javin Paul
Description:
Java.lang.NullPointerException comes when we try to access any field or method on Object which is null. Its come mainly due to programming mistake and breaking of contract between different part of application but there are few cases where you can avoid NullPointerException in Java by carefully coding like instead of object.equals("apple) you can call "apple".equals(object) which will not throw NullPointerException. More detail...Rating Detail
| Stars | Percentage | Total Vote |
|---|---|---|
![]() |
![]() ![]() 9.52% |
4 |
![]() ![]() |
![]() ![]() 9.52% |
4 |
![]() ![]() ![]() |
![]() ![]() 30.95% |
13 |
![]() ![]() ![]() ![]() |
![]() ![]() 16.67% |
7 |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() 23.81% |
10 |





9.52%

9.52%

30.95%

16.67%

23.81%