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 languages are pass by reference?
How can you add and remove nodes in jtree?
What is valid keyword in java?
Under what conditions is an object’s finalize() method invoked by the garbage collector?
How does hashmap work in java ?
Can we create object of inner class in java?
What are the basics of core java?
Why string objects are immutable in java?
Is cout buffered?
Which of the following is not an isolation level in the JDBC
Can we clone singleton object?
What is difference between path and classpath in java?
Can a function return a function?
What is the meaning of flag day?
What are predicates in java 8?