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?

Answers were Sorted based on User's Feedback



How to call static method?..

Answer / 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

How to call static method?..

Answer / ravikiran

with the class name

Is This Answer Correct ?    6 Yes 1 No

How to call static method?..

Answer / ranganathkini

A static method may be called in 2 ways:

1. Thru the class reference
2. Thru the instance reference of the class

Is This Answer Correct ?    6 Yes 2 No

How to call static method?..

Answer / ravi jain

Simplest thing to remember is

ClassName.staticMetohdName();

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between char and char *?

0 Answers  


How does serialization work

3 Answers   Ordain Solutions,


Can we place the any object to key attribute of HashMap<key,value>?

4 Answers   HCL,


What is procedure writing?

0 Answers  


Can we create our own daemon thread?

0 Answers  


What is singleton class in java and how can we make a class singleton?

0 Answers  


what is an anonymous class?

6 Answers   TCS,


Is call by reference possible in java?

0 Answers  


What we have to do, when we don't want to implement all methods of an interface?

5 Answers  


What is the difference between add() and addElement() method in Vector Class ?

2 Answers   TCS,


What do you meant by active and passive objects?

0 Answers   Wipro,


Is java 11 paid version?

0 Answers  


Categories