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

How do you create a bulleted list?

1308


What is arraylist e in java?

1113


Explain about arraylist?

1149


What is vector?

1124


Is null a keyword in java?

1024


What is object cloning in Java?

1150


Which data type is class in java?

1060


Why are the methods of the math class static?

1130


How do you replace all in word?

1132


What is included in core java?

1099


What a static class can contains?

1198


Difference between start() and run() method of thread class?

1114


You're given a Boolean 2D matrix, can you find the number of islands?

1150


What is the char data type?

1057


What are the advantages of java inner classes?

1115