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
}
}
Answer Posted / 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 |
Post New Answer View All Answers
What happens when main () method is declared as private?
what is encapsulation in java? Explain
What is method in java ?
What is gui programming?
What is size_t?
What are facelets templates?
why not override thread to make a runnable? : Java thread
is it possible to instantiate the math class?
What is constructor chaining and how is it achieved in java?
why we use merge option in hybernate pls give a ex snippet
What is meant by JVM? Is JVM platform independent or not?
what is session in java?
What is :: operator in java?
What do you mean by exception handling in Java?
Explain about version control?