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 empty string literal in java?
What is hashmap in java?
Can I uninstall java?
Why are lists ordered in java?
What is data object example?
Why we used break and continue statement in java?
Explain about the interpreter in java?
What is the byte order of byte buffer?
what is Thread priority?
4 Answers Tech Mahindra, Wipro,
What are new features introduced with java 8 ?
Write a java program to check if a number is prime or not?
Explain the selection sort algorithm and state its time complexity?