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
Explain the difference between private, public, package and protected in java?
Can a abstract class be declared final?
What is a flag value?
What is variable argument in java?
Why does java does not support multiple inheritance? Explain
Where can I find jdk in my computer?
Discuss 2D arrays.
How to store image in arraylist in java?
describe synchronization in respect to multithreading? : Java thread
Differences between C and Java?
Can a class extend more than one class?
What is string in java?
What are classloaders?
What is the main method java?
Can a class have multiple constructors?