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 types of index data structures can you have in java?

612


How do you find the independent variable?

511


Can a static class have a constructor java?

544


How to display names of all components in a Container?

2488


In the below example, what will be the output?

592






What is a java applet? What is an interface?

631


What is anagram of a string?

515


What is jvm? How its run?

659


What is a native method in java programming?

523


What is gui programming?

514


What is foreach loop in java?

530


Can we serialize arraylist in java?

538


What is boolean data type in java?

566


Is a boolean 1 bit?

610


What is javac used for?

512