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 static variable and static method?

Answer Posted / abnish kumar rajput

Static variables are those variables that are declared with
static keyword of java.Static variables are declared once
into a class and are available entire class.Static variables
are common to all objects of class.Static variables can be
accessed by non-static methods.Whereas Static methods are
those which are declared with static keyword and can only be
accessed static variables.If we have Static method then we
can call it directly with class_name.And static variables
and methods both are related to class,whereas non-static
variables and methods are related to object.

Is This Answer Correct ?    28 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How finally used under exception handling?

985


What happens if an exception is throws from an object's destructor?

1093


Can you explain the cs option of java interpreter?

990


What are the different types of inheritance in java?

1039


Is class forname reflection?

1032


What is the purpose of the system class in java programming?

1179


What is the purpose of javac exe?

1145


What is private public protected in java?

1071


Can subclass overriding method declare an exception if parent class method doesn't throw an exception?

1149


Explain about static nested classes in java?

1108


What are the library functions in java?

1095


Is there any difference between synchronized methods and synchronized statements?

1136


State one difference between a template class and class template.

1108


What happens if an exception is throws from an object's constructor?

1173


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

1139