Shared Tutorials
Tutorials Shared by the Internet Community
Advertisements
| Top Tutorials | New Tutorials | Submit | Login | Register |
Tutorial Basic 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: 6338
Total Votes: 42 votes
Average Rating: 4.07 out of 5
Category: JAVA/Core JAVA
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.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%