Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / vaishnavi
To answer Soumya's question, instance variables are declared at class level, but the instance variables still belong to an instance/object. But static variables belong to a class.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the two types of java programming?
What is loop in java?
How many times finalize method will be invoked? Who invokes finalize() method in java?
What are peerless components?
What are locale settings?
What is the difference between compiler and jvm?
Can you override static methods?
Explain about join() method?
what is synchronization and why is it important? : Java thread
What is a local class in java?
Can I declare a class as private?
What is byte [] in java?
What is difference between adapter class and listener?
What is an 8 bit word?
What is a lock or purpose of locks in java?