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 an arraylist c++?

1268


What is #include iostream h in c++?

1221


Does c++ support exception handling?

1110


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2542


program explaining feautures of c++

2489


How do you remove an element from a set in c++?

1134


How should runtime errors be handled in c++?

1193


If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?

1097


What is the basic of c++?

1105


Define whitespace in C++.

1268


Why do we need constructors in c++?

1154


What are disadvantages of pointers?

1092


What is the iunknown interface?

1181


Please explain class & object in c++?

1148


What are the various oops concepts in c++?

1084