Java Tutorial 13 - Inheritance (Superclass, Subclass, & extends)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,928
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 20, 2011

In this tutorial, you'll learn how to use superclass and subclass and the purpose of it. You will also learn a new keyword/syntax called "extends."

  • likes, 6 dislikes

Link to this comment:

Share to:

Uploader Comments (MrGIZDICH)

  • son of  a BISCUIT. This is a prime example of why developers shouldn't be teachers.

  • @m4712ix Sorry about that. I might redo this tutorial soon...

  • When do you use the reserved word *super* or *this*

  • @L8JLMnky Those two keywords are used when you have a global and a local variable that are identical. Those two keywords prevents shadowing/confusion to the program. I have two video tutorials over those two keywords if you want a detailed explanation.

see all

All Comments (19)

Sign In or Sign Up now to post a comment!
  • oh, saying "javac Tutorial1.java" will compile all .java files accociated with it. So it will also compile 2 and 3. You could also say "javac *.java" and compile all java files in the directory.

  • I learned a very good example of Inheritance in Java class at college. It's very interesting

  • Must have practiced first before recording the tutorial. Thanks anyway. :)

  • this is helpful and all but dude you really should consider getting an IDE like Eclipse or JCreator or something

  • ha har, thx man really helpful.

  • thanks yo X_X kinda get what to do for extend now

  • @MrGIZDICH

    Awesome, thank you for the help.

  • @JeffTheRambler Yes, it will automatically execute.

  • @MrGIZDICH

    No, I understood that fully, I was just wondering about the actual use of "t.methodHere();", I just wanted to verify with you that when you typed "t.whatEver();" it automatically executes that method ( With the information passed in from the parameters if it there, of course )

  • @JeffTheRambler You are correct. Tutorial2 is basically the extension of tutorial3. It's like those two classes are combined into one class, but it's really not. I hope I didn't cause any confusion.

  • Okay, so just to verify, in Tutorial1, the "t.ans();" or "t.liger();" call a method in the class of the object, in this case t, and then automatically run it?

  • ty

  • wow easyaahahaa

  • Much easier to learn this way than from the book. It's easier than I thought.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more