What is basic concept of static in java ?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

State some advantages of java?

709


What is the base class of all classes?

565


What is the difference between a local variable and an instance variable?

544


How do you empty a list in java?

532


What causes memory leaks in java?

490






What is append function?

562


Can finally block be used without a catch?

540


How to declare an arraylist in java?

480


When do we need to use internal iteration? When do we need to use external iteration?

603


What is java life cycle?

533


What is garbage collector?

618


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

1356


Is java an ide?

523


What is the main advantage of passing argument by reference?

497


Why is core java important?

570