Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / aswini

Without using instance of the class means no need to use the class object to call static variable insted directly use the classname to use the static variable.moreover ,only one copy of static varible avaible to use all the classes.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain an intermediate language?

955


Why char array is favored over string for the storage of passwords?

1066


Why spring singleton is not thread safe?

993


Discuss 2D arrays.

1042


which pattern is default in scanner package?

2227


Why do we declare a class static?

1141


Is alive in java?

940


What is the difference between size and length in java?

970


What is the purpose of the enableevents() method in java programming?

1169


What do you mean by multithreaded program?

1006


What is passing by reference in java?

1012


Explain the features of interfaces in java?

973


Explain about strings in java?

1066


How many digits is int32?

978


How to restrict a member of a class from inheriting by its sub classes?

1339