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



they asked class A{} class B{} class c{} all the three class saved as a single file,there is no m..

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

they asked class A{} class B{} class c{} all the three class saved as a single file,there is no m..

Answer / cool_duzz

What is the Question? Please explain...

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

What are the benefits of immutable objects?

0 Answers  


Why does java not support pointers?

0 Answers  


How can you set an applet’s height and width as a percentage?

0 Answers  


How can we create a object of a class without using new operator.

1 Answers   Infosys, Nokia,


Does treeset use compareto?

0 Answers  






Which sorting algorithm is in place?

0 Answers  


When we serialize an object does the serialization mechanism saves its references too?

0 Answers  


Can we override static methods in java?

0 Answers  


i need example for java abstraction. where we use abstraction and why we need abstraction.

2 Answers   Oracle,


explain System.out.println()

12 Answers   CTS,


How do you use compareto?

0 Answers  


What is finally and finalize in java?

0 Answers  


Categories