Can u overload main()method.Give with example.

Answer Posted / srinu

yes we can overloaded the main() method

public class A
{
public static void main(int a[])
{
System.out.println("overloaded method");
}

public static void main(String a[])
{
System.out.println("main method");
}


output: overloaded method

Is This Answer Correct ?    26 Yes 89 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is finalize method?

573


What is stack class in java?

538


how are methods defined?

548


What is assembly used for?

502


Write a program to reverse a number in java?

558






What is unicode used for?

568


What is the same as procedures?

529


What is the platform?

528


How many tetrahedral voids are there in bcc?

542


What are the four corner stones of oop?

542


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

588


In how many ways we can create threads in java?

628


Is a boolean variable?

515


How to read and write image from a file ?

552


What is a default method?

517