how to check if something is null if it throws null pointer exception code example
Example: how to use a try catch for a null pointer exception in java
int n;//decalred as null
n = n + 1;//null pointer exception
/////////////////////////////////////
int n = 5;
n = n + 1;//no null pointer exception