Take a look at the following picture:

As you can see a few of the exception classes are in a bold font to draw our attention to them. Here is the editors explanations about these categories of exceptions
Conditions that can readily occur in a correct program are checked exceptions. Concretely these kind of exceptions are <> by the compiler and he can correctly assess the eventuality of their occurence and declare a compilation error when the circumstances correspond to it. As you can see from the picture, NullPointerException is not directly under this category: these are the exception that directly extends the Exception class.
Severe problems that normally are treated as fatal or situations that probably reflect program bugs are unchecked exceptions.
Fatal situations are represented by the Error class.
Probable bugs are represented by the RuntimeException class. This is the case for exemple with the exceptions that extends the RuntimeException class. NullPointerException is one of them. In most of the cases of this kind of exception the compiler is not able to assess @compile time that they will cause an exception, since there is a strong dependency to the dynamic state of the application
Here is a simple illustration:
I have created two exceptions classes one that extends Exception
public class Exception1 extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
}
and one that extends RuntimeException
public class Exception2 extends RuntimeException {
private static final long serialVersionUID = 4595191052237661216L;
}
Then I have the following NewTester class
public class NewTester {
public static void methodA() throws Exception1 {
throw new Exception1();
}
public static void methodB() throws Exception2 {
throw new Exception2();
}
public static void main(String[] args) {
// methodA();
methodB();
}
}
I have purposefully commented the call to methodA.In this state you don't have any compilation error because the method that is called methodB
throws a RuntimeException which is unchecked. But if you would change this code by uncommenting the call to methodA and commenting the call to methodB you will have a compilation error, because methodA throws a checked exception
I hope this helps