Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 379

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 379

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 379

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/njssjfu/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3830: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3831: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3832: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
Action Replay Central :: View topic - Inheritance & Polymorphism [Java]

Action Replay Central

Official Forums of ARCentral.net
IRC:cookie.sorcery.net #ARCentral
* FAQ   * Rules   * Search   * Members   * The Staff
* Login
It is currently Thu Sep 21, 2017 11:49 pm

Inheritance & Polymorphism [Java]


Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Nov 27, 2009 3:09 pm   Post subject: Inheritance & Polymorphism [Java]
Poeta's Protector
User avatar

Joined: Thu Oct 05, 2006 10:23 pm
Posts: 1246
No idea where to begin on these. :( The concept has completely thrown me for a loop [no programming pun intended]. Any help would be much appreciated. I'm about to fail the class. :(
Top Profile
PostPosted: Fri Nov 27, 2009 5:29 pm   Post subject: Re: Inheritance & Polymorphism [Java]
ಠ_ಠ (☞゚∀゚)☞
User avatar

Joined: Sat Feb 28, 2004 8:50 am
Posts: 6986
Location: Behind you.‫‬‭‮‪‫‬‭‮‫‬‭‮‪‫‬‭‮‫‬‭‮‪‫‬‭‮‫‬‭‮‪‫‬‭‮
Its the "Extends" Method in Java if anyone knows about it.
_________________
ImageImageImageImage

Call me Skype Me™! Mesasge me on Steam™! IM Me

Top Profile E-mail WWW
PostPosted: Tue Dec 01, 2009 12:01 am   Post subject: Re: Inheritance & Polymorphism [Java]
Silver Member
User avatar

Joined: Thu Jul 17, 2003 2:02 am
Posts: 3523
Location: The NorthWest
Er, 'extends' is a keyword, The Jambo.

Say you have a class, car.
Code:
class car {
   int length;
   int width;
   public car() {
      length = 1;
      width = 1;
   }
}

Now, say we want to create a more specific class, sedan.
Code:
class sedan extends car {
    String model;
    public sedan(String model) {
        super();
        this.model = model;
    }
    public void drive() {
    }
}

What we've done here, is create a class that inherits all the properties of a car (the length and width), as well as its constructor (specified by "super()") and the extra method "drive()".

Tell me if that makes any sense. (not the best at explaining things) :?
_________________
Image
Top Profile
PostPosted: Tue Dec 01, 2009 8:48 am   Post subject: Re: Inheritance & Polymorphism [Java]
Poeta's Protector
User avatar

Joined: Thu Oct 05, 2006 10:23 pm
Posts: 1246
I'll read up on super() constructor. I'm still a little hazy on that. Since I posted I've had it explained a little more but not completely. :(

Thanks iDunno! :D
Top Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group