title: Java "XXX is already defined in main" error
body: <p>here is the program: (the file name is date.java)</p>
  
  <pre><code>class date {
      public static void main (String[] args) {
      int day, hour, minute;
      String firstline, half;
  
      firstline="the current imaginary time is:";
      day=24;
      hour=5;
      minute=36;
  
      String half;
      half="PM" ;
  
  
      System.out.println ("here is some program about the time kindof:");
      system.out.print (firstline) ;
      system.out.print (day) ;
      system.out.print (hour) ;
      system.out.print (":") ;
      system.out.print (minute) ;
      system.out.println (half) ;
  
      }
      }
  </code></pre>
  
  <p>here is what happens when i try to compile it in terminal: </p>
  
  <pre><code>david-allenders-macbook-pro:~ davidallender$ javac date.java
  date.java:11: half is already defined in main(java.lang.String[])
      String half;
                 ^
  date.java:15: package system does not exist
      system.out.print (firstline) ;
                ^
  date.java:16: package system does not exist
      system.out.print (day) ;
                ^
  date.java:17: package system does not exist
      system.out.print (hour) ;
                ^
  date.java:18: package system does not exist
      system.out.print (":") ;
                ^
  date.java:19: package system does not exist
      system.out.print (minute) ;
                ^
  date.java:20: package system does not exist
      system.out.println (half) ;
                ^
  7 errors
  david-allenders-macbook-pro:~ davidallender$ 
  </code></pre>
  
  <p>im learning from a book i found online. right now i'm in the chapter about variables. What did i do wrong? </p>