What is difference between static method and static
variable?

Answer Posted / n.siddardh

static variable copy is available to every object in the
memory if we change one value in an object there no effect
inother objects,and if we declare a method as static that
will be executed by the JVM like main method
The execution of JVM
1.static block
2.static methods
3.Instance methods

Is This Answer Correct ?    7 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between jdk and jre?

598


What is ascii format?

539


What is the java virtual machine?

573


What is method in research paper?

567


How to check if linked list contains loop in java?

444






What is generic type?

560


What is java beans?

566


What is meant by string is immutable?

512


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

581


What are operators and its types?

563


What is the difference between static and non-static variables in java programming?

511


What is factor r?

514


v-model life cycle

1616


Can a source file contain more than one class declaration?

504


Can a java program have 2 main methods?

538