Added: 5 years ago
From: aphonik
Views: 255,064
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (293)

Sign In or Sign Up now to post a comment!
  • Absolutely AWESOME video, thanks!

  • Think of Classes as Categories and Objects are instances of that class, example: Animal is a Class, we all know what qualifies something as an Animal. A dog is an animal, therefore A dog is an OBJECT of THE ANIMAL CLASS. A chair is not an ANIMAL because we know what a CHair is, it does not contain the attributes of the CLASS or CATEGORY ANIMAL.... Actually a CHAIR is a CLASS in that WE KNOW WHAT MAKES A CHAIR A CHAIR, and can have DIFFERENT TYPES of CHAIRS

  • Wow, this really helped me with objects!

  • Thank you for the video, you made it simple and easy to understand :)

  • hey thanks man....this helped me understand oop....

  • Really helpful

  • This video has helped me a lot you are very good at explaining the processes of Java. I have subscribed and am looking forward to viewing all your videos.

  • Great stuff - making sense eventually to me - can you doan example of object lists?

    thanks

  • Hi,

    I understand the basics pretty good. Do you have a video on how do you validate a user input inside the class? for example having the user input the age.

    I know you would have to use a setter method ( ex. setAge) but what would be the logic inside it to validate the age. in case they enter negative number.

  • Best video I have seen so far on exactly this subject.

    The 240p resolution is the only thing that could be better.

  • This video helped so much! My book gives a crappy definition for objects by simply saying they are "Instances of a class; objects are made up of attributes and methods." Nowhere in the text can I find some sample code where it points out all there is to know about objects. Thanks for showing a program and explaining everything you've done in it.

  • Now I get itt...

  • Finaly I understand it. Thank you sooooooooo much.

  • because this video saved my ass tonight, changing my life forever in the process, i decided to dedicate a poem to Aphonik for his spectacular tutorial! It goes like this:

    8:18 the video read,

    2:22 AM my comp clock said,

    "its too late" complained my head,

    on the verge of going to bed,

    After that it all did click,

    The grand double o p trick,

    Now sweet success i shall lick,

    All thank you to Aphonik!

  • I study java oo at university and all this is new for me.

    It clicked for me after seeing this video. Thought I've would have known this after 6 seminares and 2 weeks of studies.

    Thanks alot man!

  • Get full course for download

  • thanks dude...

  • Great vid thanks.

  • wat do the nos. represnt in the Class Application....

    Robot Bender= new Robot(4,67.7,245.976)

  • @ipikluninja91 I believe he is passing variables into the bender class instance. The first number is his age, becuase in the Robot class that variable appears first.

  • You are swallowing most of the words....sorry i am not able to understand you...

  • I agree 100% with the top commenter TreBros!!!

  • Thumbs up if you thought you were clicking on Buckys 5th tutorial.

  • my student teacher just hand out our summative and it is due tomorrow. only one week. worst part is we started learning about classes and objects and on the next class he gives us a summative that's too hard. and only one person knows how to do it cause he learned all the cs stuff before we did.

  • notepad and CP like a boss.

  • Quitting school because it seems i can learn Java on YouTube now. WTF? thanx dude..

  • Just fifteen minutes and forty one seconds ago I was completely lost. Thank you, sir.

  • hay, is it like you gonna Google/copy/paste the Java? I do not understand most of the statements to remember doing from the ground zero!

  • is this the same concept for using blueJ?

  • why would you use notepad? use an IDE that highlights your code depending on what each word is and other helpful things as well as only having to press one button to compile and run...good vid though.

  • now i see why our teacher went over alice before starting java. i understand the terms and the order in which they are used. we start java on monday so i hope to have a head start at using it, because alice confused me during my first encounter.

  • so useful , Bravo

  • Great introduction!

  • Oh and next time please choose another robot name. I don't watch Futurama but I do live in England :-)

    Thanks again!

  • That was indeed really helpful.  Well done.

    Cheers!

  • i understand all these languages but java is so lame wtf

  • this is the tutorial of JESUS CONDE you are a copy you are stupid for me!!!

    I hate you!!

    ESTE SEÑOR COPIA LOS TUTORIALES DE JESUS CONDE EL ES UNA COPY BARATA HIJO DE PUTA

  • Thank you so much! This is probably the most well explained, clear and perfect tutorial on OOP!

  • those r really helpful man...

  • 15 minute video and 11MB wow ! time saving....

    to download videos...thank you!

  • This tutorial is great!

    Just one thing I don't get: How does calling upon the object "bender" to access its methods (like bender.turnOff();) work if those methods aren't contained within the constructor "Robot" ?

  • FANTASTIC TUTORIAL!

    First video I watched I watch on Java OOP after reading a few websites and gave me a clear understanding of how it works.

    Cheers!

  • Cheers for that Ed, you're great at explaining.

  • lol. this is basically what took me 4 months to learn in school. very good explanation sir.

  • good job explaining it bro just one comment, get JCreator , and JDK, theyre really useful instead of using notepad you can be using a java environment, that will make your job easier, its free just look up JCreator, and Java Developers Kit, install JDK first then Jcreator 2.5 (newer versions are much slower)

  • Wow great work ,thanks a lot

  • Wow great work ,thanks a lot....................

  • the only reason why this stands out from the other OO videos on utube is because he SHOWS examples.

  • My Java teacher sucks !! and i went to youetube and found your awesome video :D

    you've solved my problems dude

    Thanks alot and keep going

  • thanks man!!

  • Wow, thank you so much man! YOU MADE SO MUCH SENSE!!!

    I love you...

  • Excellent video and presentation. Thanks

  • Java seems a LOT like C#! But I do have a question, instead of putting the Application class in a whole other program, couldn't you just put that class below the Robot class in the first one?

  • @tkmartindale

    It would be fair to say C# is a LOT like Java.. if you read the history of C# :)

  • @tkmartindale you can have classes together but it gets very messy if you write big programs with lots of classes.

  • Pretty cool..

    I got a question though

    Why do we call them methods while in C and C++ we used to call them functions?

    That got me confused for a while

  • man ! you explaned it very well

  • This seems almost just like OOP in "C++" ..Are they ? or is Java and C++ just really similar?

  • @adrianm15 , yes it is.

  • Hey, I love this video. As 'TreBros' said, you can explain theese things pretty good. Thanks for this great video!

  • thank u! u helped me understand this sooo much better!!

  • always learn from errors...lolz..

  • your explanation even better than my teacher's...subscribed...

  • Hehe thanks for the explinations. Helped me alot to understand the language

  • Very nice little lesson here, i have an OOP exam tomorrow haha need to get as much info into it as i can and your explanation helped me alot :) thanks man

  • I understand I don't need to know how it does what it does. An that I guess the point of this is to show if you program it to say I am bender Robot Age 4 etc. You now have shown us how to make it do this? I just don't see the point to the code like. Where an what would I do with this? I am new to programming as you can see. But I feel like writing code is so pointless if there is no purpose to it. Example firefox has a purpose allowing us browse pages, organize what we like by using favoritesetc

  • @x900lbGorillax

    It takes a very long time before you can program something usefull.

    And this tutorial is probably too advanced for you because all the code is kind of confusing. Manifest222 made a slightly interesting flash tutorial which shows how to make a rpg for flash cs. He didn't put enough effort into his tut's though. :(

    Download bluej, start with if, if else, for loops and while loops.

    You will probably struggle with resources to help which sucks but yeah. I told you its hard!

  • @liquidmetaltech, lol yeah I didn't really understand it but thanks for replying man. At least that helps clear some of the confusion I was having. I'll try out bluej. Thanks again!

  • @x900lbGorillax

    pm me. Have a good look for resources and get started.

    PM me and I'll help you.

    There is a java channel on quakenet and if you don't have mirc then you can atleast use some irc quakenet webchat thing, google it.

    But do NOT bother them with such very basic stuff. :D

    Thats what I'm here for. :P

  • Id just like to say that this tutorial has really helped me! I am actually programming OOP in C# at the moment for coursework and I would say that as a student, I never really was introduced to the language. However, this video has taught me a hell of alot in just 15minutes and I can just see by other comments that I am not the only one who is grateful. So thank you!! x

  • zzzzzzzzzzzzzzzzz....zzzzzzzzz­zzzzzzzz...uh!

  • Bravo!!!!

  • ... i didnt saw the video ! i saw the last secounds ! and i didnt understand what is that ??? can u explain what u do in this video ?

  • You tutorial is one of the best I have run into! Thanks

  • I can hardly hear this one.

  • hey,

    just have a few questions.

    How does the application know to run robot, and not some other program that you might have made?

    Also, you have 2 bender.process in the "Application" program. Does this have any affect?

    Also, i am confused about the robot bender = new Robot (4, 67.7, 245.976)

    How does the program know that the age is 4, the processing power is 67 and the capacity is 245.976

    thanks,

    hope i haven't confused you :S

  • It knows to find Robot because that's the name of the Robot.java file the class is stored in.

    The only affect two of the same method will have is running that method twice.

    When he was describing the Robot class he talked about the constructor. The values in the parenthesis () that you posted are called arguments. They are passed to the new Robot object bender when the object is created. The constructor reads the arguments from left to right assigning the variables to the object accordingly.

  • Yes, it gave me more too than the incapable teachers in the school.

  • i dont understand why university professors suck when we pay to go there and youtube teaches better for free

  • @mohamadalikazi Pressure.

  • @Kainaffets Its one of the excuses.... Most of them dont like what they re doing. Lot of them dont like to make friends and meet people... they re not friendly people. Some dont even have social skills.... because life was spent reading books.

    Proffesors were hired by looking at their GPA and resume'... not their personality and communication skills. Until that continues, my university fees are one of the worst investments ever.

  • Comment removed

  • Good tutorial mate. Keep em coming...

  • Calm down about him using notepad, you don't exactly have to use it... jeez.

  • thanks, nice tutorial!

  • Great tutorial ever in Java. I have been learning Java Programming but this seems really cool. Better than learning at my class in the University.

  • Ello mate, just wanted to say that cuz im puerto rican and that euro accent sounds kool. anyways great tutorial I enjoyed it even though I currently know this information I believe it was good for people currently studying java. Also @ isbcrv maybe its a good thing that he didnt merge all the methods together into one, cuz it shows new users how to create multiple methods in one class and then call them from the main. I agree eclipse should be used but hey the guy likes notepad thats kool :-D

  • Note: instead of having a bunch of different methods in the robot class - one for turning on, one for turning off, one for displaying attributes - you could also just have one method called 'run' (or whatever you want to call it) and put all the print statements inside. Then just call "run" in the application main.

  • lol you should use Eclipse instead of Notepad, it will debug these little syntactic typos for you (in additional to doing syntactic highlighting... etc)

  • @isbcrv

    ya i use eclipse and it has all kinds of helpful hints and stuff

  • better to speak louder

  • You should always include a toString method in an object that overides the default one. This way when you S.O.P the name of the object it does not say it's ram adress

  • Your missing a couple closing brackets it seems...

  • yet...

  • @JohnnyMarr03

    agree....somehow......

  • This is assuming your real world analogy, but we are programmers, it is our job to know as much as we can about the tools we use. you wouldn't want to be a mechanic and only know how some of your tools are used would you?

  • Is it me or is a class just a renamed function? You can call a function with function(); right? So assuming a function is declared you can just call(); it. Also your point about not knowing how it gets to the result, blind programing (as I call it) this is a disadvantage because it creates coders that just fob it off, "nah i dunno who it does it". The point of computer programing is to have more control over a computer the minute you introduce abstractions is the minute you loose control.

  • An object represents a real world object. A class defines an object. A method (or function) is an implementation of how something is done. An object can have many methods.

    As for not knowing how some results happen, who cares? That's a good thing! If you were creating an object of a person that drives a car, why do you need to know how the car works? As long as you have your interface (steering wheel etc...) you can drive the car. Who cares what type of engine is contained within the car?

  • awesome tutorial! Cheers

  • Thanks for this! Great job

  • Great vid, starting to understand some of this now lol...

    Too bad I'm using BV and not Java :S

  • javac is the program that compiles, google might help you find where you can get it

  • I assumed that i didn't need any software because you're not in any kind of application yourself, but when I typed in "javac Robot"

    it didn't know what javac was

  • You do need one thing. The Java Developers Kit which you can easily find by googling it. It will give your computer the library and ability to compile the java code and the command to compile java code (make it into an executable file) is "javac"

  • Thank you.

  • brillantly simple video on what can be a confusing area, I learnt something.

  • Lol... Man you think that this is all there is to OOD? All he showed you was 1/3 of OOP. There is inheritance, and polymorphism (hardest of them all)...

  • did I imply this was the be all and end all of OOP. No I didn',t your just looking for a opportunity to stamp on someone. I learnt something from the video thats all I said.

  • You were implying it was easy so incase you didn't know I wanted to inform you of the other 2/3's of OOP.

  • usually this stuff is confusing for learners I was simply saying the video made its contents simple. I'm complimenting the video for its quality, I never stated OOP was easy, how do you get that out of what I wrote.

  • Best lesson I've ever had on classes. I get confused sometimes with what goes where and how to put it all together in the end. Its nice to see it done.

  • This helped fill in some gaps from AP Comp Sci. I really feel like I understand some of our assignments a lot better now. 5 stars for awesomeness.

  • Amazing, well done! You're very good at explaining each step -- subscribed!

  • Hey man you are such a good explainer! Seriously You make it interesting and your funny too Bender haha I watch Futurama. It's is nice that you are posting this info up. You helped me alot I hope you post more tutorials up because this helps alot. Thank.s for the help Like alot of other people on here you helped fill in my gaps of understanding this Java programming language..

  • Hey, just learning this stuff myself and have a question. I noticed you don't declare the class or method a public or private value. Is that due to the version, or does it default to public?

    BTW. The video has filled some of the gaps in my understanding. Thanks for that.

  • Damn man you make this look easy. Great explanation and you are a great teacher. I take AP Computer Science and have been using Java for the last 2 years. Great job and I learn new things by watching these.

  • NO MMMS

  • amazing video, keep up the good work.

  • thx..

  • hw the application.java knows it is link to the robot.java. Is that due to Constructor Robot or saving both files at desktop.

  • ajaypaul007 - the short answer is that it because both the classes where compiled to the same directory, in this example the desktop.

    The longer answer is that it is all to do with packages, and a class will know about other classes in the same package.

    As the package is not specified for either of the java classes then the default package is assumed by the complier.

    If the classes are in different packages the import keyword is used to tell the compiler where to find the class.

  • can u plss.. give us some more tutorial about java, user input in object orriented programming sir..

    ty so much

  • The way you talk makes me drowsy. I wanna go to sleep...

  • Hey! you are amazing. your tutorials are so easy to understand! it actually makes sense. i actually started learning java programming with these giant and BEYOND complicated books i checked out of the library. that was a failure! and so i am really happy to have found these videos on youtube. Thanks so much!

  • I find that. they make it sound harder than it is

  • pleas pleas pleas some one give me the link where i can download this java thanks so much in advance

  • um... just type it...

  • what would u want to do with it if u havent typed it...

  • omfg thats exactly what im learning in school right now xD :P

  • Thanks to this (and your other tutorial videos) I made a Dog object with 5 methods. Some of them required if-else statements and one even required a switch statement. All together it took about an hour and it was my first big-ish java program. And I was able to do all of this with one book and your tutorials; so thanks again!

  • This video reminds me of the terrible time. I got C in OOP last semester. I messed up in the lab exam. At the beginning I thought I was gonna be easy until it needed database knowledge. lol

  • Very Nice tutorial, thanks!

  • well explained

  • Comment removed

  • 'bender' is an instance of the class Robot.

  • Great video for those of us that are just starting programming thanx!

  • A-ha! Thanks!!! This is what has stumped me in Java, and I think I've watched this a few times, but I'm started to get it!

    All your vids have been a great help! I wish they taught it this way, but they just hand us a heap of reading and expect us to make sense of it. It's NOT rocket science...It just needs to be explained well. THANKS!!!!!

  • thx heaps

  • What a tutorial must be. FTW aphonik ^^

  • really good tutorials!!! specially for the international baccelaurette computer science dossiere (IB english diploma in ict)

  • Thanks, I am taking on line courses and this helped me a lot.

  • I know how you feel about that programming errors thing. I do a large amount of programming in a different language. Thanks alot!

  • I am going to sleep

  • same

  • thank you, you helped me quite alot on this :) keep up the good work!

  • It´s really useful, I´m from Brasil and I like a Lot

    Thx

    Leonardo.P

  • cara em inglês e brazil :)

  • Thanks, good tutorial. I've never really got classes and that kinda stuff..this has helped.

    Also, just how relaxed are you? xD

  • am I the only one who notices how funny his voice is lol ?

  • ah u have 2 too many digits lose them it works ;)

  • ive copied this but it seems to give an error in Application under:

    Robot bender = new Robot  says error under first bender

    any ideas

  • great job i just cant hear anything, with out headphones!! i am using a laptop, anyway well done 5 stars

  • keep up the object oriented demonstrations they really help

  • I'm a beginner in java and your tutorials are of a great help.thanks!!!! :)))

  • nicely done! ^^

  • really nice tutorials

  • robot bender lol nice tutorial by the way

  • good tutorials. :-)

  • When you do the command, java, you have to only put the class that you declare at the beginning of your program. By not putting the file extension at the end, you shall be successful in executing your program.

  • I keep getting an error Exception in thread "main" java.lang.NoClassDefFoundError ...any ideas?

  • you are probably trying to run the "Robot" code you wrote, you're not supposed to run it, just compile it. then run the second piece of code.

  • WELL DONE!

  • Great work! Thanks for all the help!

  • i have a question when i try to run this it gives me this error:

    "The method turn on is not static, and cannot be accessed in this static"

    ???

  • useful, thanks.

  • the best i have seen so far!

    great work and thank you

  • ooo good and dont forget to compile :)

  • how to get a value at run time like how we are getting in c++ using ci n>>a;how to get in java. if any buddy know pls reply me

  • Hi Maestro ... :)) Thank you for your tutorials.

    I just want to say that I have difficulty understanding the function of MAIN class among other things.

    I just started studying OOP and wondered if you can give me a web address or DVD, that explains the fundamental concepts of OOP with Java.

    I'll keep watching your tutorials and thanks again, Seth