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 / sandhya reddy

Static Variables are loading when class is loading to the JVM.

Non-Static Variables are loading only when an object is
creating for the particular class.Non- Static variables
can't use inside Static Methods untill and unless creating
an object of that class.with the object reference only we
can asle to use Non-static variables inside Static methods,
But inside Non-Static methods we able to use static
variables without creating any object.

Is This Answer Correct ?    11 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how we can create packages in java?

973


what is server side caching?

2175


What is stringreader?

984


What is xslt in java?

982


What is the purpose of garbage collection in java?

1105


How do you sort data in java?

958


What is the collections api in java programming?

984


Can there be an abstract method without an abstract class?

957


What is string literal in java?

1056


Is object a data type in java?

1122


Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

1052


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

1072


What is the difference between keyword and identifier?

1025


What is the loop in java?

1157


What are voids?

965