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 the use of System class?
What advantage do java's layout managers provide over traditional windowing systems?
What is default switch case? Give example.
what is thread in Java ?
why Interface used?
How can we make copy of a java object?
What is advantage of java?
what do you mean by classloader?
how to create constants in java?
What is argument in java?
For class CFoo { }; what default methods will the compiler generate for you>?
how we can write the string concatenation program in java.