Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can we overload main method?

Answer Posted / atul

class mainoverloaded
{
public void main()
{
System.out.println("Hey");
}
public void main(int a)

{
System.out.println(a);
}
}
class maind
{
public static void main(String ah[])
{
mainoverloaded m=new mainoverloaded();
m.main();
m.main(10);
}

}
please execute this code.it is execute correctly.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is jvm? Why is java called the platform independent programming language?

1021


What is the intersection and union methods?

1022


difference between byte stream class and character stream class?

4556


How does java pattern compile work?

960


Can we override the static methods?

1033


What is the protected method modifier?

1045


What is the difference between preemptive scheduling and time slicing?

1065


What is instanceof keyword?

1213


How to create an interface?

1084


What is the difference between jvm and jre? What is an interface?

1100


What do u mean by variable?

1049


What is a variable simple definition?

1016


What is functional interface in java?

1045


Can we override static methods in java?

1070


is there a separate stack for each thread in java? : Java thread

974