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 |
What are the benefits of immutable objects?
Why does java not support pointers?
How can you set an applet’s height and width as a percentage?
How can we create a object of a class without using new operator.
Does treeset use compareto?
Which sorting algorithm is in place?
When we serialize an object does the serialization mechanism saves its references too?
Can we override static methods in java?
i need example for java abstraction. where we use abstraction and why we need abstraction.
explain System.out.println()
How do you use compareto?
What is finally and finalize in java?