What is static variable and static method?

Answer Posted / qaisarayub

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 ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a gui component handle its own events?

676


What is the meaning of immutable regarding string?

615


What is hotjava?

644


What is thread safe java?

591


Explain how can you debug the Java code?

679






What is Garbage Collection in Java

694


What is a heavyweight component?

622


What is definition and declaration?

608


State two differences between C and Java.

809


How to do encapsulation in java?

674


Can I overload to string method

1056


What are the 3 types of loops in java?

619


What is the final class?

636


What is difference between calling start() and run() method of thread?

653


What is private static class in java?

606