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

Does c++ have arraylist?

1015


How do you declare A pointer to function which receives an int pointer and returns a float pointer

1205


What is vectorial capacity?

1159


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1889


Please explain class & object in c++?

1091


why is c++ called oops? Explain

1037


What is the full form of ios?

1060


What is binary search in c++?

1028


Can I run c program in turbo c++?

1032


What is scope operator in c++?

1079


What parameter does the constructor to an ofstream object take?

1050


What is the use of object in c++?

1097


What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)

1048


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

3909


Is c++ free?

1097