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 / milanjeet singh

When we define main method as private, it will compile but when run, it show an Error as: main method is not found in the class, please define the main method as public static void main (String[] args)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is char * a string?

989


What is bigger kb or mb?

1044


Can It is possible to synchronize the constructor of a Java Class?

1121


Why main function is static?

1236


how to create daemon thread in java?

1071


Explain the access modifiers for a class, method and variables?

1142


What is ellipsis in java?

1082


There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?

1489


Can we have more than one package statement in the source file?

1054


What is the char data type?

997


Name some OOPS Concepts in Java?

1070


What is the Scope of Static Variable?

1231


What are the 4 versions of java?

1163


What does compareto () do in java?

994


What is the use of string and stringbuffer?

979