you can handel null pointer like this
try{ String A ; if( A== NULL){ System.out.println("String is null") } }catch(throwable ex){ ex.printstacktrace(); }
try{
String A ;
if( A== NULL){
System.out.println("String is null")
}
}catch(throwable ex){
ex.printstacktrace();