title: Java vs Objective C in case of nullpointer exception
body: <p>Why does Java frequently throw null pointer exception if I try to access null values while Objective C does not?</p>
  
  <p>Java:</p>
  
  <pre><code>public class SubscribeEmailActivity {
      String status;
  
      public static void main(String[] args){
  
          if(Status.equals(null)||status.equals(""){
  
              // i am getting error here
  
          }
       }
  
  }
  </code></pre>
  
  <p>Objective C:</p>
  
  <pre><code>//in .h file
  NSString *exp;
  
  //in .m file
  if ([exp isEqualToString:NULL] ||[exp isEqualToString:@""])
  {
      // i am not getting any error
  }
  </code></pre>