title: Error: Main method not found in class java.lang.String
body: <p>I tried to implement this code:</p>
  
  <pre><code>package java.lang;
  public class String {
  public static void main(String[] args) {
       for (int i=1;i&lt;=1000;i++)
           {
              String str= "1";
           }
       }
  }
  </code></pre>
  
  <p>But I'm getting </p>
  
  <blockquote>
    <p>Error: Main method not found in class java.lang.String, please define
    the main method as: public static void main(String[] args)</p>
  </blockquote>
  
  <p>I've googled and tried everything, but don't know how to get rid of it?</p>