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 relationship between clipping and repainting under awt?

0 Answers  


What are locale settings?

0 Answers  


What is the difference between a public and a non-public class?

2 Answers  


What does java final mean?

0 Answers  


What is an 8 bit word?

0 Answers  






What is predicate in java?

0 Answers  


What is method overloading with type promotion?

0 Answers  


Can java arraylist hold different types?

0 Answers  


what is the difference between equals method and ==

17 Answers   IBM, Professional Access, TCS,


How do you find the independent variable?

0 Answers  


what are literals in java?

2 Answers  


List the features of java programming language.

0 Answers  


Categories