TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
bhanu prasannakumar
NA
132
146.7k
inheritence concept
Jul 20 2010 9:19 AM
in inheritence concept overridden concept is there ,there i faced a problem i.e child class object is assigned to the parent class reference .so we r accessing the methods with same signature in parent class and child class those only we r accessing. but we r unable acess the other memberes of child class. actually my doubt is in memory point of view we r considered the what we r access the child class memberes by using parent class reference those r also same memory location why can't we r access the other methods of child class
for example
class A //parent class
{
public void add() //method
{
statments;
}
class B:A //inheriting
{
public void add() //assume overridden method we r access only these method only from parent class reference
{
statements;
}
public void sub() //unable to access the method through parent class reference why?add and sub methods r stored in same memory location but we r access only add method why not sub method
{
statements;
}
}
please help me the answer for my question.
Reply
Answers (
4
)
Uisng threads in Report generation
Wireless interface