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

What is the difference between static and non-static
variables?

Answer Posted / sathya

Static variables:
There is only one copy of static variable and even
when the class is instatiated, the value remains the same.

Non-static variables:
Every time the class is instatiated, the objest has
their own copy of these variables.

Is This Answer Correct ?    72 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of constructor?

929


What are methods of a class?

974


What is nan inf?

979


If you are given the name of the function at run time how will you invoke the function?

1077


What is integer valueof?

1041


Is empty set an element of empty set?

1030


What is use of set in java?

927


How do you stop a thread in java?

1001


Is it possible to override private or static method in java?

939


What is the advantage of preparedstatement over statement?

1046


What exceptions occur during serialization?

1033


What happens when I use / and % with a negative numerator?

995


How can we make a class singleton?

1002


What is the difference between an array and an array list?

956


What are the steps in the jdbc connection?

959