they asked class A{}
class B{}
class c{}
all the three class saved as a single file,there is no main
method in the file
and anothe class
M.java
class m
{
psvm(String args[])
{
// here the parent class can access
}
}
Answers were Sorted based on User's Feedback
Answer / suresh
Yes. You can call parent classes ( i.e A or B or C) inside
of class M by instantiate and invoke methods. If parent
classes have static methods you can directly access without
instantiating.
| Is This Answer Correct ? | 1 Yes | 0 No |
Why method overloading and method overriding required in java?
What are java packages?
Can we override static methods?
18 Answers Bally Technologies,
What is final access modifier in java?
Is &&= a valid Java operator?
What is the vector class in java programming?
What is thread pool in java with example?
What is == and === in javascript?
How to add and remove nodes in Jtree?
What is yielding and sleeping? how they different?
Why is multithreading important?
What is the difference between stored procedure & function?