NullPointerException

Exceptions by Data Structures Java

Every concept of Java like Networking, IO Streams and Multithreading etc. comes with their bunch of exceptions. Similarly, Java Data Structures also have its own lot. Name of Exception Conditions raised IllegalStateException As the name indicates, this exception is thrown when the programmer is doing an operation that is illegal at the present moment (but …

Exceptions by Data Structures Java Read More »

NullPointerException

NullPointerException is an unchecked exception from java.lang package. As the name indicates, if an object points to null and further used in the code, the JVM throws NullPointerException. Following is the class signature public class NullPointerException extends RuntimeException Following is the hierarchy Object –> Throwable –> Exception –> RuntimeException –> NullPointerException NullPointerException can be thrown …

NullPointerException Read More »