MainClass in java
<p>I found this MainClass in java which has 2 static methods.    </p>

<pre><code>public class MainClass {
      public static void main(String args[]) {
        permuteString("", "ABC");
      }     
public static void permuteString(String beginningString, String endingString) {
        if (endingString.length() &lt;= 1)
          System.out.println(beginningString + endingString);
        else
          for (int i = 0; i &lt; endingString.length(); i++) {
            try {
              String newString = endingString.substring(0, i) 
                                     +  endingString.substring(i + 1);

              permuteString(beginningString + endingString.charAt(i),
                                          newString);
            } catch (StringIndexOutOfBoundsException exception) {
              exception.printStackTrace();
            }
          }
      }
    }
</code></pre>

<p>I can use like <code>MainClass.main(args);</code> in my code which prints permutation of ABC.
I was wondering what was the purpose of creating this standard class.</p>
