Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?

Answer Posted / za

because it help us to declare class field asglobal variable

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can static method access instance variables ?

594


What about features of local inner class?

613


What is matcher in java?

512


What are the java ide's? Explain

523


When should I use singleton?

518






How do you trim a space in java?

498


How to split a string in java?

622


Can we sort list in java?

598


What is busy spin, and why should you use it?

586


What is return type in java?

628


How many return statement are allowed in a function?

453


What is the definition of tree ?

585


What are different data structures in java?

525


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1602


What does opcode mean?

533