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 |
How we can skip finally block of exception even if some exception occurs in the exception block in java?
What means public static?
Does string isempty check for null?
What is thread pool? How can we create thread pool in java?
What is the super void?
What is double word?
What are parsing rules?
What are the advantages of unicode?
Define how can we find the actual size of an object on the heap?
Why should I use abstract class?
Where pragma is used?
What super () does in java?