What is static variable and static method?

Answer Posted / niranjanravi

static variables are classes variables not instance
variables .They are instantianted only once for a
class.They are initialised at class load time.
Static method can be referenced with the name of the name
of the particular object of that class. That's how the
library methods like System.out.println works.

Is This Answer Correct ?    268 Yes 54 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if an exception is throws from an object's constructor?

629


What is ternary operator in java?

595


Name component subclasses that support painting in java programming?

637


Can we increase array size dynamically in java?

513


What is the difference between pass by reference and pass by pointer?

499






Difference between association, composition and aggregation?

561


How can u increase the heap size in the memory?

554


What does java final mean?

522


What are wrapped classes in java programming?

587


Define an abstract class with reference to java.

578


EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.

8623


What is java virtual machine and how it is considered in context of java’s platform independent feature?

655


Is break statement can be used as labels in java?

508


How to display names of all components in a Container?

2488


What is string and example?

556