can we access the super class method using subclass object?
Answers were Sorted based on User's Feedback
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 |
Answer / muthukumari
yes, we can access the base class methods using a derived
class objects.
| Is This Answer Correct ? | 9 Yes | 2 No |
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 |
What is boolean strategy?
How does the garbage collector works in java?
Are nested try statements are possible?
What are listeners in java and explain ?
What is the difference between abstract class and interface?
What is collections framework?
What is the difference between ArrayList and Vector? which one is better in Java
0 Answers SkillGun Technologies,
What are the 6 mandatory procedures for iso 9001?
What is tcp and udp?
Difference between throw and throws?
Why string is a class?
What does localhost mean?