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

How do generics work in java?

524


How much ram can a 64 bit processor theoretically?

468


What is the difference between member variables initialization and assignment in a constructor?

668


Why main function is static?

675


What do you mean by default constructor in java?

580






What an i/o filter in java programming?

608


What is the full meaning of java?

540


Differentiate between stringbuffer and string?

599


Why constructor has no return type?

639


Can we define a package statement after the import statement in java?

585


Why are lists ordered in java?

550


Which object oriented concept is achieved by using overloading and overriding?

557


Which method cannot be overridden in java?

605


What is a null check?

539


Name few java 8 annotations ?

570