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 |
Can an interface implement another interface?
What is a top level class in java?
What is difference between this and super keyword?
What java is used for?
whats the purposr of using serialization?
Is java se free?
java can provide security ,how can provide?
8 Answers Aspire, BNP Paribas, Genpact, IBM,
Explain the public class modifier?
how we can write the string concatenation program in java.
What is an accessor?
How to instantiate static nested classes in java?
Is arraylist ordered?