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 is the use of static keyword in "public static void
main()"

Answers were Sorted based on User's Feedback



What is the use of static keyword in "public static void main()"..

Answer / rozer willis

static keyword makes the main function static.And the
advantage to make it static is that it can call other
static methods of the sane class just by their names i.e.no
need to create object.And the static method cant be
override so it prevent the main method from onerriding.

Is This Answer Correct ?    34 Yes 4 No

What is the use of static keyword in "public static void main()"..

Answer / p.r.gupta

the use of static is for static methods we need not to
create any object,so internally jvm calls like classname.method

Is This Answer Correct ?    13 Yes 0 No

What is the use of static keyword in "public static void main()"..

Answer / subha, bijji

a static is a method that is called with out using object.
we can call a static method is like classname.method name.
it is very usefuul in public static void main()

Is This Answer Correct ?    4 Yes 1 No

What is the use of static keyword in "public static void main()"..

Answer / praveen

static is method that can be called and executed without
using obect

Is This Answer Correct ?    3 Yes 0 No

What is the use of static keyword in "public static void main()"..

Answer / sudhir

static is a keyword which indicate that method is call with
the class name.

Is This Answer Correct ?    2 Yes 0 No

What is the use of static keyword in "public static void main()"..

Answer / mary kamal

Static keyword is identified by jvm at the time of class loading,so main() function is the jvm known function it should be identified at the time of class loading...so hence it is named as static

Is This Answer Correct ?    2 Yes 2 No

What is the use of static keyword in "public static void main()"..

Answer / sadikhasan palsaniya

static method can call without using Object name and can
call using Class name so JVM can use main method for execute it.
so it is require static keyword in main method. without
static JVM cant run Program.

Is This Answer Correct ?    0 Yes 0 No

What is the use of static keyword in "public static void main()"..

Answer / rajesh

Execution starts from main method, but in this statement
importance of "static" is, it load in memory even before
first object is instantiated.

Is This Answer Correct ?    0 Yes 0 No

What is the use of static keyword in "public static void main()"..

Answer / rasool

The public keyword is an access specifier, which allows the
programmer to control the visibility of class members. When
a class member is preceded by public, then that member may
be accessed by code outside the class in which it is
declared.In this case, main( ) must be declared as public,
since it must be called by code outside of its class when
the program is started. The keyword static allows main( ) to
be called without having to instantiate a particular
instance of the class.

Is This Answer Correct ?    2 Yes 3 No

What is the use of static keyword in "public static void main()"..

Answer / kiran kumar

here public is access modifier it can run out side of the
class.
static means it is constant.
void means it is no return type.
main() means the program will run from here.

Is This Answer Correct ?    8 Yes 12 No

Post New Answer

More Core Java Interview Questions

Can you declare a static variable in a method?

7 Answers  


Why would you desing a J2EE application so user data is entered by way of a JSP page and managed by an underlying Java Beans class?

5 Answers   Adobe,


what is inner class?

6 Answers   HCL,


What is the purpose of the file class in java programming?

0 Answers  


Differences between GridLayout and GridBagLayout?

1 Answers  


What is a char in java?

0 Answers  


How do you implement polymorphism in our day to day life?

0 Answers   Cap Gemini,


what is the meaning of java.lang and java.util

6 Answers  


Why we use protected in java?

0 Answers  


what is difference between equals and ==?

0 Answers  


How core java/j2ee project performance can be measured ?

1 Answers  


What is a nullable field?

0 Answers  


Categories