Java CLASS, OBJECT, HEAP Memory and Class Variable Types. Object Oriented Java Tutorial #9.1

  Рет қаралды 44,294

Smartherd

Smartherd

7 жыл бұрын

Access 7000+ courses for 15 days FREE: pluralsight.pxf.io/c/1291657/...
Java Tutorial for CLASS, OBJECTS, HEAP MEMORY, VARIABLE TYPES and how REFERENCE variable or INSTANCE variable works in terms of Heap memory and Stack Memory. Watch the next video for the demo code explanation.
Source code files: bit.ly/2MC04SR
Next Video : • Java GETTER and SETTER...
Previous Video : • Java Method Overloadin... .
.
Please donate and support my work
(If you think my free tutorials are better than paid ones :)
- Patreon: bit.ly/patreon-donate
- Paypal/Payoneer: sriyank123@gmail.com
- UPI (only for India): smartherd@okaxis
:: If you want to develop a website or a mobile app, email me your requirement at sriyank.siddhartha@gmail.com :: Free demos provided beforehand ::
- Access my premium courses: bit.ly/sriyank-courses
Free Programming courses:
- Ruby Programming: bit.ly/smyt-r
- Dart Programming: bit.ly/smyt-d
- Kotlin Programming: bit.ly/smyt-k
- Java Programming: bit.ly/smyt-j
- Kotlin Coroutines: bit.ly/smyt-coru
Free Flutter course:
- Flutter App Development: bit.ly/2Rg7EFR
Free Android courses:
- Android using Kotlin: bit.ly/smyt-ka
- Android using Java: bit.ly/smyt-ja
- Android Material Design: bit.ly/2SMJqU6
- Android Jetpack Architecture: bit.ly/yt-j
- Android Multiple Screen Support: bit.ly/smyt-mss
- Android Retrofit: bit.ly/2Ee6GHn
More free programming courses:
- bit.ly/smy-list
Check out my website:
- bit.ly/smartherd
Let's get in touch! [Sriyank Siddhartha]
LinkedIn: bit.ly/sriyank-linkedin
Facebook: bit.ly/smartherd-facebook
Instagram: bit.ly/sriyank-instagram
Twitter: bit.ly/sriyank-twitter
Github: bit.ly/smartherd-github
--- Thank you for your love and support ---

Пікірлер: 58
@Jandroraya
@Jandroraya 6 жыл бұрын
had a bunch of "oh damn ok that's easier than I thought" moments. Thanks man
@Invento_Boost
@Invento_Boost 5 жыл бұрын
All day i was studying these concepts and finally got the perfect video on it. Thanks a lot!
@MD-py2de
@MD-py2de 4 жыл бұрын
The best straightforward and simple java course I have ever seen, Thank you.
@asbkochiadmin9064
@asbkochiadmin9064 4 жыл бұрын
You explains it so well....The concepts that I found hard to understand are explained so well in your tutorial that now I feel its so simple...Thanks a lot...
@thestarinthesky_
@thestarinthesky_ 4 жыл бұрын
The best explanations ever! It was very helpful. Thank you.
@pristine_the_tech_guy
@pristine_the_tech_guy 5 жыл бұрын
Perfectly explained.. You're amazing sir.
@sangeetakumar3857
@sangeetakumar3857 6 жыл бұрын
Finally, I found videos that explain the concept very well ! Thanks a lot !! I have seen so many Java tutorial videos but my understanding is so much better after watching your videos. The good visual explanation is what sets your videos apart from the others . It is sooo easy to get the concepts by looking at the visuals !!!
@jeerawanpk
@jeerawanpk 3 жыл бұрын
Wow, I felt exactly the same thing. I searched a lot of video just to get this kind of explanation.
@starriet
@starriet 3 жыл бұрын
newbies can be confused at 6:11, usually when you say 'instance variables', it indicates the variables in the instance, such as 'breed', 'age', 'color' in the example. To be precise, those non-static fields are 'instance variables', and static fields are 'class variables'.
@rockmusicvideoreviewer896
@rockmusicvideoreviewer896 2 жыл бұрын
I agree with you.
@user-vb5di5np9e
@user-vb5di5np9e 2 жыл бұрын
great , the best and clearest video ever .
@mohammadfarhan6940
@mohammadfarhan6940 5 жыл бұрын
Jai ho Aapki😃😃😃 You have cleared all my doubts, thanks for the explanation
@jeerawanpk
@jeerawanpk 3 жыл бұрын
Wow, thank you so much. Very clear explanation.
@75STARFISH
@75STARFISH 3 жыл бұрын
This is super helpful. Thank you so much!
@shiVam01242
@shiVam01242 2 жыл бұрын
Thankyou ... Beautifully explained
@kmtk82
@kmtk82 5 жыл бұрын
amazing, thank you!
@cablemaster8874
@cablemaster8874 3 жыл бұрын
Thanks for your teaching method
@muditkushwaha6176
@muditkushwaha6176 5 жыл бұрын
Very nice video bro..good job..my concept got cleared..
@nima7605
@nima7605 2 жыл бұрын
Your tutorials are awesome. Keep it up
@aksanoramos2898
@aksanoramos2898 4 жыл бұрын
You are the best, well done.
@sridevi-jp3ic
@sridevi-jp3ic 4 жыл бұрын
Nice video ! Thanks a lot !
@gamersoul1098
@gamersoul1098 4 жыл бұрын
great explanation tnxxxxxx
@vijaygurusamy4055
@vijaygurusamy4055 2 жыл бұрын
Good explanation
@koshykoshy9276
@koshykoshy9276 6 жыл бұрын
very good explanation.
@chayae3740
@chayae3740 3 жыл бұрын
Thanks a lot
@makikiplays4173
@makikiplays4173 4 жыл бұрын
NICEE, THANKYOU
@uttammewara7380
@uttammewara7380 4 жыл бұрын
WAS REALLY GOOD VIDEO !!
@xxxx-kv9ei
@xxxx-kv9ei 5 жыл бұрын
"instance" is a word used for dungeons in games, which are accessed through a portal and takes you to another locations. It means a method which is accessible somewhere else
@rockmusicvideoreviewer896
@rockmusicvideoreviewer896 2 жыл бұрын
wrong
@bijimoljoseph6313
@bijimoljoseph6313 3 жыл бұрын
Thank you
@srinikaganegoda6967
@srinikaganegoda6967 3 жыл бұрын
good lesson sir
@h3w45
@h3w45 4 жыл бұрын
Thank you.
@SmartProgramming
@SmartProgramming 5 жыл бұрын
very helpful tutorial, keep it up sir 👍👍👍👍🙂🙂🙂🙂
@smartherd
@smartherd 5 жыл бұрын
thanks a lot
@muditkushwaha6176
@muditkushwaha6176 5 жыл бұрын
Keep going like this..
@ajithk2183
@ajithk2183 4 жыл бұрын
Thank uuuuu....so much
@ZiadddTV
@ZiadddTV 5 жыл бұрын
perfect explanation!
@smartherd
@smartherd 5 жыл бұрын
Thanks
@JAYESHSHEWALE
@JAYESHSHEWALE 5 жыл бұрын
Very nicely explained...subscribed
@smartherd
@smartherd 5 жыл бұрын
Thanks
@SeniorGeneralOmega
@SeniorGeneralOmega 6 жыл бұрын
Happious code doesn't come aroudn as objects without space : but in time with 0 functions 0^0 in object in a line can resend information with emails then a computer gets jerked a system running a across a main waiting for a main signal 0 : 1 ) .
@mayankchauhan9867
@mayankchauhan9867 7 жыл бұрын
sir I have prblm that i understood your concept very well but i DON't KNOW HOW TO PRACTICE .PLEASE HELP ME SIR ..
@RaghusEntertainment
@RaghusEntertainment 3 жыл бұрын
bark() and run() will throw error as the "local variables" are not initialized.
@satyamkumarmal7783
@satyamkumarmal7783 3 жыл бұрын
You are following head first java book I think so !!!
@user-yk2qr6zw7m
@user-yk2qr6zw7m 3 жыл бұрын
How is the memory (stack and heap) look like if I have array of object? Example: Person [] people = new Person[10]; people[0] = new Person(); people[1] = new Person(); where Person class has 2 instance variables name and age?
@dprashanth5279
@dprashanth5279 4 жыл бұрын
Underrated channel in KZbin Your video are awesome😍😍😍😍😍
@rushabhoswal8280
@rushabhoswal8280 7 жыл бұрын
Objects are stored in heap by default? Is their any way to store object in somewhere else?If object are stored,they will consume memory, so how to clean that memory?
@smartherd
@smartherd 7 жыл бұрын
+Rushabh Oswal well you don't have to clean memory. Once the reference variable pointing to that object becomes null then the object becomes useless.. So here comes the garbage collector that automatically cleans up the objects and increase the heap memory back.
@rushabhoswal8280
@rushabhoswal8280 7 жыл бұрын
Smartherd , how to store object into some other location?
@smartherd
@smartherd 7 жыл бұрын
+Rushabh Oswal objects are always stored in heap memory. There is one more memory area known as stack memory where the primitive data type and reference variables are stored. I will make a separate video on heap memory, stack memory and garbage collector.
@altinuku6766
@altinuku6766 5 жыл бұрын
Hi, congrats to your video. I think that you can makeit better after minute 10:38 when you say that dog2 and dog3 has the same age. It is incorrect cause you before , correctly says that they are simply pointers to the object D2. It is much better to not speak about dog2 and dog3 has the same age, but this two different pointers cause they point to th same object , every modification of the variables of the object D2 will be visible for both pointers. I think that all this confusion comes when in java they teach to us : We create and object using Dog dog2 = new Dog(); without explainis clearly every piece of this point. 1 ) it is an expression. ( expressions can have different forms ) 2 ) The evaluation of this expression start from right to left to be excetuted. 3 ) new Dog() creates a new object in HEAP (our object D2 and our object has a memory address ) 4 ) Dog dog2 define a object reference. 5 ) the simbol = assign the memory address of the object to our object reference. [ if we try to do a System.out.println(dog2) we will have the memory address stamped. ] 6 ) if we wont to access to every variable of our object ( D2 ) we can do it simply calling the object reference and the name of the variable that we want to access. example dog2.age So , as last i want just to remember that dog2 and dog3 are not our object but just our OBJECT REFERENCE. Object is all the structure and Object Reference is simply the address memory of our object.
@amlam5685
@amlam5685 5 жыл бұрын
hi Altin Uku what is the point of having these 2 object references dog2 and dog 3 ? am new on programmig
@altinuku6766
@altinuku6766 5 жыл бұрын
​@@amlam5685 watch this video: kzbin.info/www/bejne/i5SzpoqPZdyhadk When you program sometimes you are costraint to to have two or more object references to the same object in memory. You should always pay attention when you modify values cause if you modify a variable value of the object from one of the refecence object it will be visible for all the reference objects that point to this object. One case is when you need to have access ( just to read the data of the same object in different point of the program.
@mercy2655
@mercy2655 4 жыл бұрын
He is speaking in English and why i feel like he is teaching in hindi.
@smartherd
@smartherd 4 жыл бұрын
Because u r able to understand my English 🤣
@mercy2655
@mercy2655 4 жыл бұрын
@@smartherd Sir your explanations are directly getting into my head.Thank you Sir.
@hirakain5006
@hirakain5006 6 жыл бұрын
What is requirement of Dummy Variable??? Dog dog4;
@akshayak.b8722
@akshayak.b8722 4 жыл бұрын
Amazing explanation
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 22 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 59 МЛН
#26 Stack And Heap in Java
12:37
Telusko
Рет қаралды 213 М.
Java Stack + Heap with Reference & Instance Variables
23:58
Job Ready Programmer
Рет қаралды 224 М.
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 22 МЛН