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 difference between static and non-static variables

Answer Posted / mahesh_b.tech@2008

Non-static variables:

Instance block can be executed automatically when you were
creating the object.

Instance variables can be called by using with the object.

Instance variables can not called by using the class name.

memory will be alocated for instanse variables when you
create the object.

Static variables:

static block will be executed automatically when jvm(Java
Virtual Machine)loading the class into memory.

static varisble can be called using both objectname&class
name.

memory will be allocated when jvm loads the class.

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a hash function c++?

1072


Define what is constructor?

1066


What should main() return in c and c++?

1026


Is eclipse good for c++?

1046


Describe new operator and delete operator?

1085


Explain how overloading takes place in c++?

1047


What is meant by iomanip in c++?

1216


Why c++ is called oop?

1118


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

1117


When should I use unitbuf flag?

1016


Which software is used to run c++ program?

1004


What are the advantages of c++?

1894


What is singleton class in c++?

1046


Differentiate between declaration and definition.

1050


Define pointers?

1049