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
How do you compare characters in java?
What data type is a string?
Can inner class extend any class?
What's a method in programming?
Why are the objects immutable in java?
What is difference in between java class and bean?
What is boolean false?
What is the mapping mechanism used by java to identify IDL language?
What are the disadvantages of using inner classes?
Explain the difference between throw and throws in java?
How many types of the indexof method are there for strings?
What are disadvantages of java?
How would you dynamically allocate memory to an array?
Is empty .java file name a valid source file name?
design an lru cache in java?