File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inheritance doubt

 
lynn fann
Ranch Hand
Posts: 115
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic