Top "Nullpointerexception" questions

The Java exception thrown when an application attempts to use null in a case where an object is required.

Is it okay to throw NullPointerException programmatically?

When there is a post-condition, that return value of a method must not be null, what can be done? I …

java exception-handling nullpointerexception throw
Why does String.valueOf(null) throw a NullPointerException?

according to the documentation, the method String.valueOf(Object obj) returns: if the argument is null, then a string equal …

java null nullpointerexception overloading api-design
Loading resources like images while running project distributed as JAR archive

I am having a error for my GUI. Trying to set title bar icon then be included in a Runnable …

java swing nullpointerexception awt embedded-resource
Java Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

OK what I am trying to do here is create a game where the object/ball is controlled by clicking …

java swing nullpointerexception jpanel paintcomponent
Errors running builder 'Android Resource Manager' on ADT

I am facing a problem when I try to create new android project in eclipse adt plugin tools. ERROR/EXCEPTION:: …

android eclipse nullpointerexception adt
How to solve this : 'Running android lint' issue

In any activity of my project, if i do some changes and then save that activity i got the message "…

android eclipse nullpointerexception android-lint
NullPointerException on list.add

I am getting a NullPointerException at the modelData.add(i, es) method. I know from debugging that es isn't null. …

java nullpointerexception
Why does int num = Integer.getInteger("123") throw NullPointerException?

The following code throws NullPointerException: int num = Integer.getInteger("123"); Is my compiler invoking getInteger on null since it's static? That …

java integer nullpointerexception api-design autoboxing
Spring Boot - Environment @Autowired throws NullPointerException

I have a project setup using Spring Boot 0.5.0.M5. In one of the configuration files I am trying to @Autowire …

java spring-boot nullpointerexception autowired environment
printStackTrace to java.util.logging.Logger

How do I print the entire stack trace using java.util.Logger? (without annoying Netbeans). The question should've originally specified …

java nullpointerexception java.util.logging throwable printstacktrace