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...

When we can access the static data member without creating
the object what is the need of the object in java.

Answer Posted / paras bist

Static data is class level data,while objects contain
values of non static instancs varibles.
diffrent object contains diffrent values of instance
varibles ,
but all object can share same vale of static data.

Class abc{
int i;
int j;
static int x=10;
//-----some more code
}

diffrent object contain diffrent values of i&j,
but all object can share one value of x(ie 10 coz it is
static).

static data is accessed by class name and object also.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is gui programming?

1109


What is meant by call by reference?

1086


Does variable declaration allocate memory?

1092


What are different types of inner classes ?

1100


Explain reverse a linked list recursive java solution?

1045


Give me an example of array and linked list? Where they can be used?

1059


What is a finally block?

1030


What is the size of a string in java?

1073


Can a class have multiple constructors?

1133


How can we make copy of a java object?

1213


What is java command?

1130


Are arrays immutable in java?

1149


Similarity and difference between static block and static method ?

973


Why does my function print none?

1007


How does sublist works in java?

1027