title: main method with class name and file name
body: <p>My file name is Temp.java and inside it I have this. I'm using eclipse IDE</p>
  
  <pre><code>/*package*/ class Test {
      public static void main(String args[]) {
          System.out.println("test");
      }
  }
  </code></pre>
  
  <p>So I was unable to run this as java application. I change my class name to Temp</p>
  
  <pre><code>class Temp {
   ....
  }
  </code></pre>
  
  <p>Now I can. Can someone explain me why ?</p>