Learn Java Tutorial for Beginners, Part 13: Classes and Objects

///Learn Java Tutorial for Beginners, Part 13: Classes and Objects

Learn Java Tutorial for Beginners, Part 13: Classes and Objects

FavoriteLoadingAdd to favorites

Get complete courses at http://courses.caveofprogramming.com
A basic tutorial on using classes and objects in Java, plus some discussion of what classes and objects actually are. This tutorial focuses on classes containing only data; next time I’ll look at “methods”.

Java468x60
By |2017-05-10T19:55:25+00:00May 10th, 2017|Java Video Tutorials|49 Comments

49 Comments

  1. Ratna Kumari May 10, 2017 at 7:56 pm - Reply

    Thank u john…well explained..

  2. Psyche Artis May 10, 2017 at 7:56 pm - Reply

    Nope…not gonna pass this exam….sigh

  3. Deco Joe May 10, 2017 at 7:56 pm - Reply

    your videos are the Best at breaking down Java ; Your voice sounds like Zartan from the Gi Joe cartoon. very cool

  4. Shilpa Gupta May 10, 2017 at 7:58 pm - Reply

    hello Sir,
    Here you have not declared the class PERSON as Public…so how it is getting accessed in main ??
    is that ..the class person is bydefault public ?

  5. The gamer May 10, 2017 at 7:58 pm - Reply

    can I write .. string name ; and int age;
    outside any class . and would make the same effect ????

  6. ali khatab May 10, 2017 at 7:58 pm - Reply

    The program cant find the main class, I have this problem when I write before public

  7. Esteban V. Prado May 10, 2017 at 7:59 pm - Reply

    You have a truly soothing voice haha and I really really like you videos. I’ve been trying to grasp the concept of classes and objects, and I finally feel like I’m understanding. Thanks 🙂

  8. Scott Francis May 10, 2017 at 8:00 pm - Reply

    super annoying, the wet sound in his mouth is louder then him talking..

  9. MrKool951 May 10, 2017 at 8:01 pm - Reply

    Oh man, this ten minute video made so much more sense than my two hour lecture.

  10. minimalist34 May 10, 2017 at 8:01 pm - Reply

    Thank very much Cave of Programming, your tutorials are the most concise and clear explanations on important fundamental concepts, I salute you sir!

  11. Flesh Sandwich May 10, 2017 at 8:01 pm - Reply

    This was very helpful. I appreciate your reasonable pace and proper explanation.

    Absolutely subbed.

  12. Dev BrownBear May 10, 2017 at 8:01 pm - Reply

    Thank you, Sir.

  13. w33dnesday May 10, 2017 at 8:01 pm - Reply

    creating person/ people actually is called having sex so programmers arent that nerd how they seem

  14. Jason Bassos May 10, 2017 at 8:02 pm - Reply

    PUBLIC STATIC VOID MAIN, PUBLIC STATIC VOID MAIN, PUBLIC STATIC VOID MAIN !!!!!

  15. ghvy1122 May 10, 2017 at 8:05 pm - Reply

    maybe a silly question, but where you declare String in your class file, ‘Person’, is it possible to declare String as an array, or would it not make sense to do so since you are initializing the variables in the App file?

  16. Hadrian Stave May 10, 2017 at 8:05 pm - Reply

    So i play the video, listen to the music and hear that british accent-and i become certain: This guy can teach some CLASS

  17. Juan Chavez May 10, 2017 at 8:05 pm - Reply

    drink water man.

  18. Lachlan Perrier May 10, 2017 at 8:06 pm - Reply

    my god thank you aout this for spelling it out for me

  19. Meow. May 10, 2017 at 8:10 pm - Reply

    I’ve watched several tutorials on this subject, and this is definitely the best and most clear of all of them. Thank you.

  20. Gaurav Chauhan May 10, 2017 at 8:13 pm - Reply

    why we have to create object in main class , can’t we create it in person class itself?

  21. slier81 May 10, 2017 at 8:13 pm - Reply

    what is the purpose of `public` keyword infront of a `class` ?

  22. nathan Heath May 10, 2017 at 8:14 pm - Reply

    made my lecture 1000 times easier

  23. dafdarf May 10, 2017 at 8:16 pm - Reply

    Ignore this if it’s explained later, but so far …
    I’m baffled that you created a new class called "Person" and defined variables (name & age) in it, but the objects of that class (person1, etc) are not actually IN that class, but in the main class.  most peculiar, momma 

  24. David Kim May 10, 2017 at 8:16 pm - Reply

    Wow… This video was very clear and helped me understand. Thank you!

  25. Sukhdeo Gupta May 10, 2017 at 8:21 pm - Reply

    very nice video!,.could u please increase font size?..because font is not visible clearly….

  26. Alex Donev May 10, 2017 at 8:24 pm - Reply

    Excellent!

  27. Mahadonation1 May 10, 2017 at 8:26 pm - Reply

    thanks for this, the fog is starting to settle KEEP IT UP!

  28. Javier De la Rocha May 10, 2017 at 8:26 pm - Reply

    Finally it made sense!!! Thanks a lot.

  29. Cerrik Chin May 10, 2017 at 8:27 pm - Reply

    Why don’t you normally have multiple classes in a .java?@2:30

  30. MTTU B1996 May 10, 2017 at 8:28 pm - Reply

    I can hear this guy’s saliva building up in his mouth goddamn

  31. Michael Boerrigter May 10, 2017 at 8:29 pm - Reply

    One of the better tutorials explaining classes in Java.

  32. Heat4Life May 10, 2017 at 8:33 pm - Reply

    Thanks to this tutorial I have come up with this:

    >>>>>HALL OF FAME<<<<<
    Mark Zuckerburg|Age: 24|Rank: Private
    Markuss Persson|Age: 34|Rank: Sergeant
    Soap McTavish|Age: 46|Rank: Captain
    Gabe Newell|Age: 48|Rank: General
    >>>>>>>>>><<<<<<<<<<

  33. Kgb May 10, 2017 at 8:35 pm - Reply

    Voice is very ASMR haha. This tutorial still applies but for new people I would recommend checking out Java 8 tutorials for the most up to date usage of Java. Don’t learn old material

  34. mithun manohar May 10, 2017 at 8:36 pm - Reply

    Great!!

  35. connor connolly-moyls May 10, 2017 at 8:39 pm - Reply

    Drink a goddam glass of water dude

  36. Metathron May 10, 2017 at 8:39 pm - Reply

    Some more clarification: person1 and person2 are Instances of the object Person. They basicly are their own copies of the Object. If you change variables in the Instance you wont change the variables in the object Person itself. Its more like the class Person is the blueprint fpr its instances.

    Almost everything in Java is made of Classes. if you invoke e.g. a String the string is an object somewhere in the library and you create an instance of it. This will become more clear during the next lesson "methods" because you’ve already worked with methods included in the String object.

  37. Rasoul Azizi May 10, 2017 at 8:41 pm - Reply

    Just start learning java from your excellent videos…you rock bro:) thank you

  38. Indy Maat May 10, 2017 at 8:44 pm - Reply

    Your voice is very comforting!
    Also your explanation is very comforting.

  39. AQ Nahid May 10, 2017 at 8:45 pm - Reply

    Really Really helpful 🙂 Thank you so much

  40. BoxedLogic May 10, 2017 at 8:46 pm - Reply

    You are a hero sir,
    My teacher can’t seem to explain anything I only wished I had happened upon this earlier in the semester

  41. Swedish coder May 10, 2017 at 8:46 pm - Reply

    Very well done video.

  42. Novaski May 10, 2017 at 8:47 pm - Reply

    nice, nice voice also super chill, me like.

  43. Dillon Coffman May 10, 2017 at 8:48 pm - Reply

    I clicked on the video to learn, was greeted by some fancy piano. Top that off with a soothing British accent and some string instrumental and I felt like I had to get up and put on a suit.

  44. adam051838 May 10, 2017 at 8:48 pm - Reply

    Very nice, finally have an understanding of objects. Other tutorials aren’t very clear at all, thanks! 😀

  45. alain karam May 10, 2017 at 8:50 pm - Reply

    video leaked: programming class from the renaissance

  46. Doug0101 May 10, 2017 at 8:50 pm - Reply

    Is this the same guy from udemy? It sounds just like him and the intro music is very similar to udemy’s videos on the iphone app.
    Very good video I’ll have to watch it again though.

  47. Bobby Jones May 10, 2017 at 8:51 pm - Reply

    No homo, but this man accent on point and he is using all the terms like state that are 8n my book.

  48. thexxmaster May 10, 2017 at 8:54 pm - Reply

    Thanks for this.

    I don’t understand why you need to declare what ‘type’ the person1 variable is?
    I’m referring to the ‘Person person1 = new Person()’ line.
    I would understand if it was like this ‘ person1 = new Person()’ as you are creating a new object but i don’t understand why there is the need for the first person.

    Any help would be great.

    Cheers

  49. dunbustin May 10, 2017 at 8:55 pm - Reply

    If you declare a variable of type Person by putting   Person person1;   you get the message that it has not been initialised when you attempt to assign age and name values to it.

Leave A Comment

*