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

Can a singleton class be inherited?

0 Answers  


where do you place after you did code in java

2 Answers  


Write program to print Hello World and print each character address in that string and print how many times each character is in that string? Ex: H: 0 & 1 e:1 & 1 l :2,3,8 & 3 o:4,6 & 2 w:5 & 1 r: 7 & 1 d 9 & 1

7 Answers   Huawei, IBM,


What is the difference between a checked and an unchecked exception?

0 Answers   Cyient,


What are the performance implications of interfaces over abstract classes?

1 Answers  


Explain break statement and continue statement?

3 Answers  


What does escaping a character mean?

0 Answers  


How many bytes is a string?

0 Answers  


What is difference between synchronize and concurrent collection in java?

0 Answers  


Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?

0 Answers   Amazon,


Can we define private and protected modifiers for the members in interfaces?

0 Answers  


Explain where variables are created in memory?

0 Answers  


Categories