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 do you know about java?
What is a method signature java?
What is difference between synchronize and concurrent collection in java?
What is the method used to get the absolute value of a number?
What is tcp and udp?
Does it matter in what order catch statements for filenotfoundexception and ioexception are written?
Why is inheritance used in java?
What is an example of a boolean?
What do you meant by active and passive objects?
Can we initialize the final blank variable?
Are floats faster than doubles?
What is local declaration?