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


Please Help Members By Posting Answers For Below Questions

What is anagram in java?

494


What is the difference between abstraction and encapsulation?

532


What is passing by reference in java?

515


What are the super most classes for all the streams?

1135


What are the different access modifiers available in java?

542






What do you mean by inner class in java?

542


What are adapter classes?

582


Write a program to reverse array in place?

559


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

504


what is the difference between Object Based Language and Object Oriented Language?

571


Explain public static void main(string args[]) in java.

513


What is byte data type?

528


Can interface be private in java?

523


Is vector thread safe in java?

531


How to create a thread in java?

587