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

Why do we use public static with the main function in Java?

Answer Posted / saikat chowdhury

'public' keyword is an access specifier.It means you can access anywhere of the program using this specifier.When we use in the main function it can be access outside of the(class, package,subclass.'Static' also a keyword.When we use this in the main function that means you do not need to create the object of static.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is final static java?

1071


Difference between vector and arraylist.

1182


Does string is thread-safe in java?

1141


Implement two stacks using a single array.

1103


What is the difference between break and continue statements?

1093


What are disadvantages of java?

1040


What is the difference between C++ and Java and your preferences?

1159


How we create object in copy constructor?

1167


What is the use of singleton class?

1012


What is the difference between compile-time polymorphism and runtime polymorphism?

1059


What is tcp and udp?

1068


Explain access modifiers in java.

1102


What is the impact of declaring a method as final?

1072


Explain how to convert any java object into byte array.

1012


Is java still relevant?

1025