Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

1. ## Teach me about inheritance and extends?

How does

x is-a y
x has-a y
x wants-a y

work?
When do you use has-s in regards to X inherits Y, Y has a X or something like that?

3. ## Re: Teach me about inheritance and extends?

I need a little bit of help with contain.
If x is-a y x inherits from y, but does this mean y contain x as well?

4. ## Re: Teach me about inheritance and extends?

What do your lessons and text book say?

Can you write a simple program to show the problem you are having?

5. ## Re: Teach me about inheritance and extends?

Not a program just logic. For example
X inherit y =x is a y
how do i use this logic when it deals with has-a?
x inherit y = y has a x? Is that how it works?

And how would you use contain in an = expression?

6. ## Re: Teach me about inheritance and extends?

This is OOP theory. You'll get better answers for these questions from your textbooks or tutorials.

7. ## Re: Teach me about inheritance and extends?

What does OOP stand for?

8. ## Re: Teach me about inheritance and extends?

Is Google working where you are connected to the internet?
Give it a try