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

Is array synchronized in java?

993


What is a boolean flag in java?

959


What is the purpose of interface?

948


What is boolean in java?

917


What are the advantages of java over cpp?

1022


What is a boolean in java?

1002


What is the difference between static (class) method and instance method?

1027


Does substring create a new object?

946


What is the default value of local and global variables?

1041


Why do you canvas?

986


Does java support Operator Overloading?

988


How many ways can an argument be passed to a subroutine and explain them?

963


What is the default size of load factor in hashing based collection?

986


What is the private method modifier?

1032


What is the difference between a method and a procedure?

998