can we access the super class method using subclass object?

Answers were Sorted based on User's Feedback



can we access the super class method using subclass object? ..

Answer / azeem

Yes, you can acess the super class method by using the
subclass object because the super class methods are visible
to subclasses if not overriden. If the method is overriden,
then acess the super class method by using super.methodname

Is This Answer Correct ?    17 Yes 0 No

can we access the super class method using subclass object? ..

Answer / muthukumari

yes, we can access the base class methods using a derived
class objects.

Is This Answer Correct ?    9 Yes 2 No

can we access the super class method using subclass object? ..

Answer / ravi jain

Yes, we can access the methods of super class in child classes

if they accessible in child class according to their (access
specifier) i.e. public , default, private, protected.

Is This Answer Correct ?    2 Yes 0 No

can we access the super class method using subclass object? ..

Answer / naveen kumar t

If A is the super class and B is the subclass
inside subclass :
A a = new B();
a.methodA();

Here the methodA() should not be private.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between stream and buffer?

0 Answers  


What is a nonetype?

0 Answers  


If all the methods in abstract class are declared as abstract then what is difference between abstract class and in interface?

8 Answers   Infosys, Synechron,


What is a void method?

0 Answers  


Define how does a try statement determine which catch clause should be used to handle an exception?

0 Answers  






What is the use of join method?

0 Answers  


In C we use only compiler. Why java uses both compiler and interpreter? What is its significance?

5 Answers  


What do you mean by synchronized non access modifier?

0 Answers  


Difference between current previous versions of Java?

0 Answers   Atos Origin,


What sorting algorithm does javascript use?

0 Answers  


Which collection is thread safe in java?

0 Answers  


What is the difference between JDK and JVM?

0 Answers  


Categories