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

When should the method invokelater() be used?

1070


What are keywords and reserved words in java?

1118


What is a website container?

1010


What is the string function?

1004


What is method in java ?

1145


What are the wrapped, classes?

1109


How is hashset defined in java?

1089


What does it mean to flush a file?

1112


What is meant by stack and queue?

1125


What is the use of arrays tostring () in java?

1073


What is meant by interface?

1105


How does thread synchronization occurs inside a monitor?

1182


What is the use of a conditional inclusion statement in Java ?

1139


How do you declare an array that will hold more than 64KB of data?

1388


Can we use string in the switch case?

1094