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
Difference between serialization and deserialization in java?
Can variables be used in java without initialization?
What is bigger kb or mb?
Why collection doesn’t extend cloneable and serializable interfaces?
Differece between class and generic class?
What do you mean by formatting?
Why scanner is used in java?
What is close method? How it's different from Finalize & Dispose?
What does mean in regex?
Explain the init method?
What is a parameter in java?
What is default switch case? Give example.
What is return type in java?
Which class contains a method: cloneable or object?
Can we create object of inner class in java?