How to overload main() method.



public class MultipleMainMethod

 {

public static void main (String args[])
          {
MultipleMainMethod m=new MultipleMainMethod();
               System.out.println("Hello main method");
m.main(1);
          }

      public static void main(int arg)
         {
System.out.println("Hello Overloaded main method");
         }
}

Comments

Popular posts from this blog