Monday, 15 September 2014

It is possible overloading the main method in java

Yes. It is possible.

public class MainOverloaing {
public static void main(String []args)
{
System.out.println("Hi");
}
public static void main(int... args)
{
System.out.println("hello");
}
}

Output:  Hi

No comments:

Post a Comment