Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Lesson 001: Java - Working With Objects (part 1 of 4)

Loading...

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

Uploaded by on Jan 8, 2010

This is just an unscripted video (part of a series of videos) showing an example of how to work with objects and classes in Java. It is a very superficial example to give the novice an understanding of how to work with classes.

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (10)

Sign In or Sign Up now to post a comment!
  • Did you really have to make an example of balls lol

  • ..... ur name's Fabio? lmao!

  • the best way to think of it is that you're accessing a super class by creating an object

  • Thanks for your video its really informative..

    can you by change help me in my java course work pls?

  • Very nice video. At first I was impatient listening to you but then as I Iisten on, everything starts to make sense. Great technique.

  • In this case, the value of isFlat is dependent on airPressure. The airPressure field is private, so we can only change it's value through inflate() and deflate(). However, if you updated only airPressure and not isFlat (or vice versa), you could end up with a ball that is flat but has air pressure, leading to a violation of consistency. Since calculating the value of this attribute is relatively uninvolved. While caching has its place, it's probably better to have an isFlat() method instead.

  • I think the ball example is a pretty good introduction into Java (and object oriented design in general), since it actaully forces some understanding of what you're doing into the exercise. I have one thing that'd I'd like to point out that don't particularly affect this example too much, but could lead to difficult to manage code in larger projects. Assuming one had a definition for isFlat (e.g., pressure is less than 1), it should be derived. (continued)

  • Thanks very much for taking the time to make this tutorial. Having practical examples makes a world of difference!

    The audio compression is a tad annoying, but the tutorial itself is quite helpful!

  • Thanks dude! really helped me out! (:

  • Thanks for this ( 4 ) parts ,

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