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...

What happens when a main method is declared as private?

Answer Posted / amit kumar chaubey

If the main function is made private...it will compile
Sucessfully...and at the time of execution...it will
execute successfully...but desired result will not be
obtained. After execution..folowin message will be printed:
Main method not public.

Is This Answer Correct ?    25 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What modifiers may be used with a top-level class?

1108


What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

1173


What technique is carried out to find out if a particular string is empty?

1057


Does garbage collection occur in permanent generation space in jvm?

1139


Is java owned by oracle?

1070


Explain access specifiers?

1238


What is null in java?

1024


Why are parameters used in functions?

1076


Differences between external iteration and internal iteration?

1212


List some java keywords sun like c, c + + keywords?

1060


Can we inherit a class with private constructor?

1177


What's the difference between comparison done by equals method and == operator?

1018


What is void in java?

1144


What is the use of hashmap in java?

1133


What is the purpose of garbage collection in java? When is it used?

1090