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 to call static method?

Answer Posted / maharajan j

Static methods we can call without class reference.We don't
need to create an object of that particular class.

For example:
class A{

static void disp(){
sysout("Java")
}
}
class B{

B(){
A.disp();
}

}

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between private, public, package and protected in java?

1001


Can a abstract class be declared final?

952


What is a flag value?

963


What is variable argument in java?

958


Why does java does not support multiple inheritance? Explain

932


Where can I find jdk in my computer?

927


Discuss 2D arrays.

1010


How to store image in arraylist in java?

929


describe synchronization in respect to multithreading? : Java thread

883


Differences between C and Java?

1130


Can a class extend more than one class?

1063


What is string in java?

967


What are classloaders?

976


What is the main method java?

978


Can a class have multiple constructors?

968