• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inheritance doubt

 
lynn fann
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i code 2 java file that has inheritance. for example message, reply. reply will inherit from message. i know have to use extends. but how do pass variable?
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For general OOPs and inheritance, you can check out this site and this site as well as about umpteen million other tutorials online.

Or are you asking a specific question on inheritance?

/Pete
[ March 17, 2007: Message edited by: pete stein ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inheritance is as simple as telling the compiler which class to extend (inherit from)...

At that point, a Reply IS-A Message.

I don't understand what you mean about passing variables. Can you be more specific?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic