can we access the super class method using subclass object?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about main thread in java?

863


What are different data types?

763


How do you replace all in word?

711


What is a null check?

755


Can java inner class be static?

751


What data type is a string?

724


Can a final variable be initialized in constructor?

701


Which class is used by server applications to obtain a port and listen for client requests?

708


What is oops in java?

767


What is natural ordering in java?

728


What is the purpose of tostring() method in java?

786


What are the Main functions of Java?

825


What is method overloading and method overriding?

756


What do you mean by global variable?

706


What is port number in java?

788