Java Variables VS. Objects - Reference Type Variables VS Primitive Variables - APPFICIAL

Sdílet
Vložit
  • čas přidán 14. 03. 2018
  • Variables are created using primitive data types, such as int, double, char, boolean, etc. Objects (reference type variables) are created using class data types. When creating an object, the new operator allocates space in memory to store the object, and returns a reference to the objects memory location.
    SUBSCRIBE!

Komentáře • 11

  • @jacksondaniels007
    @jacksondaniels007 Před 6 měsíci +3

    Thank you so much for publishing this video. You did an excellent job of explaining these concepts.

  • @mkamaal1000
    @mkamaal1000 Před měsícem +1

    thanks. explanation was simple, easy yet important

  • @Appficial
    @Appficial  Před 4 lety +1

    Please SUBSCRIBE! More programming videos coming soon! ✌️

  • @rahulguptaftii
    @rahulguptaftii Před 4 lety

    Videos are really good to understand all the rules in Java programming but I need the exercises for mastering the rules, Is it possible to have exercises for all the videos on Java. Thanks for the great videos.

  • @tomaszmachaj6485
    @tomaszmachaj6485 Před rokem +1

    Could you please also explain how should be understood a object reference if there is no "new" key word? Should I consider it as variable of type of the class that I created?
    So many times I saw this solution watching YT tutorials but nobody has explained it. The methods were called on the object reference but there was no key word "new" in the code.

    • @Appficial
      @Appficial  Před rokem +1

      Yes just a variable of the class type. However, the keyword new creates space in memory for the object. The only object that doesn't require new are Strings

  • @joelduran9344
    @joelduran9344 Před 3 lety +1

    Hey professor, I have a question. I created two classes one named PoliceOfficer, the other named ParkedCar, and in the PoliceOfficer class it's asking me to "examine a ParkedCar object"
    I don't know what that means... to examine an object???

    • @Appficial
      @Appficial  Před 3 lety +2

      I think you got to create an instance method in the PO class called examineCar() and pass a PC object to it and see if it's parked illegally or not

  • @ItsPouring
    @ItsPouring Před 3 měsíci +1

    How much do you R🎸CK! Thank you!