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

Explain about join() method?

902


What is the old name of java?

917


What is method overriding in java ?

1118


What is stringwriter?

901


What are the legal operands of the instanceof operator?

961


How infinite loop is declared?

966


what is comparable and comparator interface?

940


What is a generic data type?

962


Can we convert stringbuffer to string?

957


Can we overload the main() method?

984


What is the program compilation process?

1034


Explain how to convert any java object into byte array.

923


If a variable is declared as private, where may the variable be accessed?

1000


Is void a type?

928


How can I right-justify a string?

1094