What is the purpose of static keyword in java?



What is the purpose of static keyword in java?..

Answer / Amit Trivedi

The static keyword in Java is used to create class-level variables, methods, and blocks. These elements are shared among all instances of a class, rather than being specific to each instance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is constructor

9 Answers   Manforce, Tech Mahindra,


Can you change array size in java?

1 Answers  


What is string builder in java?

1 Answers  


Difference between local and global transaction ?

1 Answers   Accenture, iFlex,


What is the difference between the size and capacity of a vector?

1 Answers  


Can we declare a constructor as final?

1 Answers  


How do you call a reference in java?

1 Answers  


Difference between current previous versions of Java?

1 Answers   Atos Origin,


What is multiple inheritance? Is it supported by java?

1 Answers  


What is an interface in java?

1 Answers  


How do you format in java?

1 Answers  


what is the purpose of using rmisecuritymanager in rmi?

1 Answers  


Categories