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 / srinivaskumar.nimmana

Yes, we can... like this,

public static void main(String[] args){....}
pulbic void main(int a){....}
public static int main(flaot f){....}
public String main(string s){....}

in the above code public static void main(string[] args) executed as thread remaining methods are normal methods in our java class. in jvm p.s.v.main(string[] args) defined with thread so jvm always search for this syntax only.any other main() with diffrent parameters are consider as normal method

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How concurrent hashmap works?

1239


What is the difference between error and an exception?

1231


What are wrapped classes in java programming?

1101


What is the main functionality of the remote reference layer?

2050


What is a lightweight component?

1064


What is the purpose of finalization in java programming?

1070


Is space a character in java?

1065


Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.

1107


What does it mean to be immutable?

1029


What are the Main functions of Java?

1129


Can java list be null?

1038


Can an integer be a string?

1147


What are the differences between getting and load method?

1285


What is the static field modifier?

1172


Explain implementation and how is it different from conversion?

1128