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 / santosh mundhe

Static:1)Memory allocated before creation of object.
2)Gets memory on Global segment.
3)Object can't get copy of static variable, each
object shears static variable from global segment.
4)Static variables are not part ob object.

Non-static:
1)Gets memory on satck segment.
2)Object gets copy of non static variable.
3)Non static variables are part of object.

Is This Answer Correct ?    8 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the abstraction?

1022


What is the final method?

1074


What is the largest data type in java?

978


What do you mean by chromounits in java8?

957


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?

1099


What is the syntax and characteristics of a lambda expression? Explain

1053


What is constant in programming?

1112


What is the use of java?

962


What is the purpose of the main method?

993


What are anonymous inner classes?

1012


What does += mean in java?

1097


What is the main method java?

1037


Explain restrictions for using anonymous inner classes?

1095


What is abstract class? Explain

1046


What are the advantages of user defined functions?

1007