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 / vaishnavi

To answer Soumya's question, instance variables are declared at class level, but the instance variables still belong to an instance/object. But static variables belong to a class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?

1280


Why stringbuilder is not thread safe in java?

974


What is ctrl m character?

1005


What is the purpose of static keyword in java?

913


Is java owned by oracle?

963


What is the tradeoff between using an unordered array versus an ordered array?

1175


what is the difference between a threads start() and run() methods? : Java thread

969


Is there is any difference between a scrollbar and a scrollpane?

944


Can we override data members in java?

1094


What are the important methods of java exception class?

1040


How do you remove spaces in java?

986


Can long be null in java?

963


What is autoboxing and unboxing?

953


What about interrupt() method of thread class ?

1019


What is a generic code?

992