Java Variables VS. Objects - Reference Type Variables VS Primitive Variables - APPFICIAL
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!
Thank you so much for publishing this video. You did an excellent job of explaining these concepts.
Thanks Jackson
thanks. explanation was simple, easy yet important
Please SUBSCRIBE! More programming videos coming soon! ✌️
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.
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.
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
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???
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
How much do you R🎸CK! Thank you!
lol thanks