How do we compare null values ? For example, I am trying to compare null by
class_name == "null"
But the code doesn't checks if the class is null. What's wrong ?
How do we compare null values ? For example, I am trying to compare null by
class_name == "null"
But the code doesn't checks if the class is null. What's wrong ?
 
    
     
    
    You are comparing it to the reference of the String "null".
Remove the double quotes so you get the special null type (JLS).
You want:
class_name == null
              ↑
 
    
    class_name == null because in your way you compare it to string not to null
 
    
    