How to call static method?
Answers were Sorted based on User's Feedback
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 |
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 |
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
0 Answers Akamai Technologies,
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
What are the differences between string and stringbuffer?
What's a method in programming?
what is difference between perfom() & excute() ?
what is language and it responsibilities
What loop means?
Can we sort list in java?
How to make class immutable
difference throws and throw in java
What is multithreading and its advantages?
Explain the difference between runnable and callable interface in java?