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 a final variable be initialized in constructor?

687


What is the properties class in java programming?

726


What is type inference in java8?

783


how are methods defined?

770


Can we extend a class with private constructor?

711


Can an interface extend another interface?

801


What are advantages of using Java?s layout managers than windowing systems?

2069


What do you mean by pointer value and address?

782


What is scanner in java?

727


Is minecraft 1.15 out?

735


How does list work in java?

687


What is default locale java?

775


What is a flag value?

704


Can interface be private in java?

749


What is boolean keyword in java?

858