I'm new in java programming. Now I have a problem when I have String variable equals to null. When I check condition on that String it error :
Exception in thread "main" java.lang.NullPointerException.
This is my code :
public class Test {
static String a=null;
public static void main(String[] args) {
if(a.equals(null)){
System.out.println("Null");
}
}
}