title: Instantiating object from inside the main of that class in Java
body: <p>I was looking through my OOP class documentation and I found this example:</p>
  
  <pre><code>class Student {
      private String name;
      public int averageGrade;
  
  
      public Student(String n, int avg) {
          name = n;
          averageGrade = avg;
      }
  
      public static void main(String[] args) {
          Student s = new Student("John", 9);
      }
  }
  </code></pre>
  
  <p>I find it confusing that they are instantiating an object from the main of the same class. Is this considered bad practice? Will the newly created object <code>s</code> have a main method?</p>
  
  <p>Thank you!</p>