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...

How do you use, call, and access a static method in Java?

Answer Posted / glibwaresoftsolutions

• The static keyword needs to appear before the method name.
• Use the class (className.methodName) to invoke a static method.
• No non-static instance variables or methods can be accessed by static methods.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a parameter used for?

913


Can we execute a program without main() method?

984


What is the formula to calculate percentage?

965


Can we have try block without catch block?

985


What is better- service oriented or batch oriented solutions?

2145


What is empty list in java?

1026


Do extraneous variables affect validity?

868


Java.util.regex consists of which classes?

941


What are the methods used to implement for the key object in the hash map?

983


Can we change the value of static variable?

902


What is float in java?

937


Can we sort a map in java?

972


What are extraneous variables examples?

1013


Is zero a positive integer?

987


what is function overloading in java?

1212