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 / dharma

main method signature must be like

public static void main(String args[])

if we declare as private then it compiles successfully

but at Runtime it says

"Main method not found in class"

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are bind parameters?

1041


How do you sort a list in java?

1033


What is incompatible types in java?

1032


Can we sort set in java?

950


Explain the use of sublass in a java program?

1023


What is java literals?

1127


What is the difference between a factory and abstract factory pattern?

1140


What are voids?

960


What is java in simple terms?

996


Is a case study a method or methodology?

896


What is static block?

1127


What is the importance of static variable?

1112


Why runnable interface is used in java?

1130


why we use merge option in hybernate pls give a ex snippet

1995


What is the return type of the main method?

1033