title: main() arguments in java
body: <p>I'm trying to write a code for a program that recives strings as an input. 
  The program prints "Error" when the user does not  put any data, otherwise it prints the first string argument.</p>
  
  <p>Is it right to refer to no data as a "null"? 
  It does not work. what should I write instead?</p>
  
  <pre><code>public class Try {
  public static void main(String[] args){
      if (args[0]==null){
          System.out.println("Error- please type a string");
      }else {System.out.println(args[0]);}
  
      }
  }
  </code></pre>