What is basic concept of static in java ?



What is basic concept of static in java ?..

Answer / narayanarao bp

Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, and static methods are attached to a class, not an object. A static method in a superclass can be shadowed by another static method in a subclass, as long as the original method was not declared final. However, you can't override a static method with a nonstatic method. In other words, you can't change a static method into an instance method in a subclass.

Is This Answer Correct ?    15 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is abstract class? Explain

0 Answers  


Explain the use of shift operator in java. Can you give some examples?

0 Answers  


What Is Resource Leak?

2 Answers  


Differentiate between overriding and overloading cases?

0 Answers   Amdocs,


What is the difference between hashmap and hashtable? What is an interface?

0 Answers  






What is a JAR file?

0 Answers  


When super keyword is used?

0 Answers  


What is garbage collection? Can it be forced to run?

0 Answers   Global Logic,


what is the purpose of method overriding in java where v r completely re-defining a inherited method instead y can't v create a new method and define.If the question is very silly plz excuse me and do reply.Thank U!

7 Answers   emc2, Kumaran Systems,


What is a resource leak ?

1 Answers  


Why java is made?

0 Answers  


Can a constructor have different name than a class name in java?

0 Answers  


Categories