can we overload main method?

Answer Posted / shrirang & chetak

yes , we can overlode main method but we can not override
main method

example :
class a
{
public void main()
{
System.out.println("0.00000000");
}

public static void main(String ar[])
{
a A=new a();
A.main();
}
}

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum length of a url?

703


Explain java coding standards for constants?

757


Where local and global variables are stored?

758


What is the use of 'super' keyword inside a constructor?

724


Write a program to print fibonacci series

784


What is the similarity between dynamic binding and linking?

779


What is the use of StringTokenizer class?

795


What are the legal operands of the instanceof operator?

768


When do you get classcastexception?

755


Difference between == and .equals() ?

734


What is int argc char * argv?

765


Why call by value prevents parameter value change?

789


What are different types of inner classes ?

756


why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

728


What is methodological framework?

770