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 is anagram in java?
What is the difference between abstraction and encapsulation?
What is passing by reference in java?
What are the super most classes for all the streams?
What are the different access modifiers available in java?
What do you mean by inner class in java?
What are adapter classes?
Write a program to reverse array in place?
Is it possible to use Semaphore/ Mutex in an Interrupt Handler?
what is the difference between Object Based Language and Object Oriented Language?
Explain public static void main(string args[]) in java.
What is byte data type?
Can interface be private in java?
Is vector thread safe in java?
How to create a thread in java?