Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / sumit pal singh
static keyword is mainly used for memory management purpose. And static variable is used for declare the common property of object.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Write a function for palindrome and factorial and explain?
Can we assign the reference to this variable?
Can we make constructors static?
Can we extend private class in java?
Can you override private or static method in java?
What is difference between fileinputstream and filereader in java?
Explain the difference between the public, private, final, protected, and default modifiers?
worst case complexities of Quick sort and Merge sort.
What is difference between public static and void?
How many types of equations are there?
Can you give few examples of final classes defined in java api?
What do you mean by ternary operator in java?
Can you instantiate the math class in Java?
What is final method in java?
What do you mean by thread safe?