Тёмный

Java Stack + Heap with Reference & Instance Variables 

Job Ready Programmer
Подписаться 120 тыс.
Просмотров 225 тыс.
50% 1

An excerpt from my new course titled "Master Practical Java Development".
In this course, you'll learn everything you need to know about the Java Programming Language and become a confident industry-ready core Java developer and get certified as a Java professional!
=========================================
➡️ Learn MORE:
Access all of my software development courses using the discount below: www.jobreadypr...
Email me if you have questions: info@jobreadyprogrammer.com
Become Job Ready with our NEW Programming Guide (PDF): pages.jobready...
=========================================
➡️ Get the entire Java course for a low price on Udemy at this link: www.udemy.com/...
Latest updates include Lambdas and Streams with Java 9 Features.
Course Last Updated: 2023!
=========================================
➡️ Connect with me:
LinkedIn: / imtiaz-ahmad-80117324
Twitter: / jobreadyproinc
=========================================
➡️ Job Ready Programmer Socials:
Job Ready Programmer Courses: www.jobreadypr...
LinkedIn Page: / jobreadyprogrammer
Discord Community: / discord
Facebook Page: / jobreadyprogrammer
Instagram: / programmerready
JRP Blog: www.jobreadypr...
JRP Weekly Newsletter: pages.jobready...
Linktree: linktr.ee/jobr...
=========================================
➡️ Welcome to The Complete Java Certification Course
This course is designed to help you master the most in-demand and critical components for becoming a Core Java developer.
Especially if you're going for a job interview or have a Java Project that needs your best performance.
This course assumes no prior java experience so prior Java so it will take you from zero to hero!
➡️ COURSE INCLUDES:
Java Basics
Working with Java Data Types
Using Operators and Decision Constructs
Creating and Using Arrays
Using Loop Constructs
Working with Methods and Encapsulation
OOP Basics
Working with Inheritance
Java Class Design
Handling Exceptions
Working with Selected classes from the Java API
Advanced Class Design
Generics and Collections
Lambda Built-In Functional Interfaces
Java Stream API
Exceptions and Assertions
Use Java SE 8 Date/Time API
Java I/O Fundamentals
Java File I/O (NIO.2)
Concurrency
Building Database Applications with JDBC
➡️ The topics covered also include:
Object Orientation which I think is not stressed enough in other Java courses so I've got a special focus on that throughout the lectures.
You'll get plenty of practice writing classes and interfaces as well as countless methods with loops and if-else statements, exception handling and file processing as well as how to debug software using Eclipse.
You'll also be mastering the collections framework and diving deep into java generics.
You'll learn all there is to know about multi-threading and the JDBC API for working with a MySQL database.
There are also practical projects scattered throughout the course so that you can practice the concepts as you learn them. For example one of the projects is related to a car dealership management system and another assignment involves processing files with stock market data. So as you can see I tried to keep the projects professional and industry relevant rather than cloning a game like flappy bird.
I want this course to be the ultimate go-to resource for anyone that's looking to become a core Java programmer so I intend on adding more content to this course based on new technologies and student feedback.
The content is Java 9 ready which means I'll show you how to upgrade to the latest version of Java which is version 9 and I'll teach you how to configure Eclipse to work with both Java 8 as well as version 9.
I'm confident that you'll enjoy this course at least as much if not more than my other popular Java courses, but as always you've got a 30-day money-back guarantee no questions asked! Check out the preview lectures and join today!
=========================================
#jobreadyprogrammer #databasedeveloper #softwaredeveloper #career #sql #tableau #databases #database #webdeveloper #html #css #javascript #java #javabasics #javatutorial #javaprogramming #aws #admin #jobready #programmer

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 309   
@NOCDIB
@NOCDIB 5 лет назад
In my 15 years of professional Java experience I must say that this is the best explanation I have ever seen of stack and heap memory. Great job!
@Samad_27
@Samad_27 3 года назад
Is java is good to learn in 2021
@NOCDIB
@NOCDIB 3 года назад
@@Samad_27 Yes. Yes it is.
@Samad_27
@Samad_27 3 года назад
@NOCDIB thanks but one more question how to improve programming skills
@suyashgupta4019
@suyashgupta4019 7 лет назад
Brilliant video, couldn't have explained it any better!
@israayusuf3712
@israayusuf3712 7 лет назад
I saw your OOP videos first and I prayed God that I find some videos for the heap and stack that you explain. I can't tell you how happy I was when I found this video. THANKS A TON :")
@imtihajlaskar
@imtihajlaskar 5 лет назад
Israa Yusuf
@fer-torres
@fer-torres 6 лет назад
Not everyone learns in the same way. But, your way of explaining this makes a lot of sense to me, thank you for sharing such valuable info here!!
@thestarinthesky_
@thestarinthesky_ 5 лет назад
You have done a good job on demystifying the whole terminology things! You should be a teacher! Thanks for the subtitles too. Very helpful!
@kmellos
@kmellos 4 года назад
He is a teacher. He has a course on udemy. Check the descriptions guys..
@ivanh9567
@ivanh9567 4 года назад
Imtiaz: * Shows how primitive type save in the heap * Me: "Cool, but what about class objec..." Imtiaz: * Explains about class object * Oh man, thanks you :)
@mrwalkan
@mrwalkan 3 года назад
Explained Concisely. BRAVO!!
@semyonnaumov2664
@semyonnaumov2664 3 года назад
The greatest explanation I've ever seen. Thank you, Imtiaz!
@nishant2242
@nishant2242 6 лет назад
the way you explain stuff is just amazing . Your udemy video on class design got me a job in a product company . thanks a ton
@Setofhornsandahalo
@Setofhornsandahalo 7 лет назад
Not all heroes wear capes!
@shivamb-s8k
@shivamb-s8k 5 лет назад
I do!
@skgyri
@skgyri 4 года назад
Why this message here? Cant get it
@abhishekbarman4327
@abhishekbarman4327 3 года назад
Not all heroes spell 'caps' correctly
@SiddhantSaraf0
@SiddhantSaraf0 5 лет назад
Pretty good video. Thanks! But there are two important points you should've covered here: 1. Why does Java do this? I think the first question which comes to my mind is: why not store the objects on the stack too? 2. What happens when we call a method with arguments? For example, what happens when you call the method 'doWork' using that 'age' variable: doWork(age)? How do variables work then. Or if you call doWork with a reference variable, like myCar. Things get really interesting then :p Other things you could've mentioned, not necessarily though: 1. This is the right place for you to just give a quick mention of what a stacktrace is. That stack diagram with method frames is just begging for you to mention stacktraes in passing. :-) 2. For people who might have studied DSA, might be wondering: yes, that looks like a stack but why it that called a heap?
@PandeyJii9632
@PandeyJii9632 4 года назад
You have a weak mind. All the primitive variables and references put inside method including parametrs reserve place in stack inside method block
@PandeyJii9632
@PandeyJii9632 4 года назад
A ref variable can nvr call a method u fool. It is called by an object to which the ref var could ref to.it is done by instantiation.and then call the method by using dot operator.
@garybrar5518
@garybrar5518 2 года назад
@@PandeyJii9632 Him asking a question and giving possible feedback doesn't make him a fool or a weak mind. Get over yourself mate
@Chungus581
@Chungus581 2 года назад
@@PandeyJii9632thinking curiosity is for people with weak minds is itself weak minded. Asking questions is one of the most important parts of learning
@MohdImran-rz9to
@MohdImran-rz9to 4 года назад
Great explaination......thanx ...now m able to figure out what actually goes inside jre
@ehsansasanian9653
@ehsansasanian9653 4 года назад
This guy is really good at explaining, this is the best explanation I've ever seen of stack and heap memory. well done !
@davitkvaratskhelia4033
@davitkvaratskhelia4033 3 года назад
I'm going to repeat it step-by-step with my students.. Cool!
@RahulYadav-qg5ec
@RahulYadav-qg5ec 3 года назад
Great explanation! BTW, String is also a class, so 'name' variable's data will also be stored on heap. (Like explained for Car)
@mostafaahmadi4998
@mostafaahmadi4998 3 года назад
man, it was an incredible explanation with just a pen and whiteboard. Thank you
@amiladrck
@amiladrck 5 лет назад
This is the best explanation I've ever seen about the stack and heap. Thank you so much!
@shashipagonda
@shashipagonda 5 лет назад
I went through multiple videos to understand stack and heap where there was some lagging but after seeing this video, it makes me clear. Thank you so much for explaining in detail
@srinivasanbalan2469
@srinivasanbalan2469 4 года назад
You are a God's gifted teacher to all students n professionals. Hats off! Imtiaz.
@monowarhossainshuvo9269
@monowarhossainshuvo9269 3 года назад
With due respect, you deserve my like, comment and obviously subscribe. Thank you so much, sir.
@30ynot
@30ynot 9 месяцев назад
Great video! Best explaination I have found, thank you!
@IkhsanNoorRosyidin
@IkhsanNoorRosyidin 4 года назад
Awesome explanation bro, your hand writing is not a problem at all.
@brandonlovatt
@brandonlovatt 5 лет назад
Imtiaz, I feel like sometimes I can hear your accent slip juuust a little. I can only imagine how hard it would was for to learn a language and really nail the accent in a clear, precise way for the native speakers you are teaching. Immense respect! Something I'm not sure I'd be capable of.
@MJ-cf9nl
@MJ-cf9nl 5 лет назад
And that was all what you got out of this video, right? his accent and when/how he slipped out. I hope that you paid attention and actually learned something from what he was actually explaining.
@uyenchang9062
@uyenchang9062 3 года назад
@@MJ-cf9nl Can you chill maybe he's just a random stranger passing by and he's not even looking for learning stack and heap? You don't know for sure. Plus he's complementing Imtiaz anyway.
@mr.yanlucena8463
@mr.yanlucena8463 5 лет назад
WTF! This is the best video I have ever, EVER, watched! Who is this genius?! I am subscribing right now! Thank you, Imtiaz!
@gossipwithahmadsalar1208
@gossipwithahmadsalar1208 3 года назад
One of the Super Best explanations I have ever seen.
@thestarinthesky_
@thestarinthesky_ 5 лет назад
I REALLY need this video at this time!That is what I have been looking for !Thank you so much. it has been super helpful!I appreciate it
@snowwhite2146
@snowwhite2146 3 года назад
What can I say. You are very good at teaching! Thank you! I will definitely use your link to study more.
@vishnupradeep3979
@vishnupradeep3979 4 года назад
I watch this every time, before I starting any new project.
@Adam-gp3ij
@Adam-gp3ij 5 лет назад
Sir, I am completely shocked ! you are AMAZING ! thank you so much
@salvatoreamaddio2983
@salvatoreamaddio2983 3 года назад
You should be teaching in schools, wonderful explanation
@bonishagarwal6315
@bonishagarwal6315 3 года назад
The best explanation I got for stack and heap memory. Thanks a lot sir.
@aniruddhashahapurkar9244
@aniruddhashahapurkar9244 3 года назад
Hats off!! Brilliantly explained!!
@sobserve
@sobserve 4 года назад
That guy born with a gift of knowledge transfer, man!
@narikumar
@narikumar 3 года назад
Excellent explanation, i loved it, thanks Imtiaz
@shanikayrs9116
@shanikayrs9116 8 лет назад
clear explanation Finally found something explain the Java concept with pleasant to listen English :) .
@jeevansaimanikanta782
@jeevansaimanikanta782 5 лет назад
Sir The explanation is superb and clear. I haven't seen this much clear explanation on Garbage Collection and Stack Vs Heap. Thank You so much. Please put Videos on REST API as well.
@pavantejavydhik7354
@pavantejavydhik7354 5 лет назад
Thanks much Imtiaz, this video will be like a dictionary for me , you clarified lots of doubts which persists in my mind since long time Its a appreciable attempt to put this huge insight in such a short vid
@ferasmasoud428
@ferasmasoud428 4 года назад
Great job Imtiaz, Your explanation makes sense. But when I found your channel, I was looking for how to treat the static methods and polymorphim in memory, hope you can extend your explanation to accommodate these terminologies... Best Regards. Feras
@supernussknacker
@supernussknacker 5 лет назад
Very clear explanation. However you didn't mention in your first example (08:30) that String is a referenced Type. This could cause some confusion for viewers who could get the idea that the values of the String are stored on the Stack.
@response2u
@response2u 7 лет назад
Great video! Just a little point missing: Once bigEngine is defined in main() in the stack, it has to refer to an Engine () in the heap (that line is missing) Then my3Car.myEngine is set to bigEngine in the stack which is already referring to Engine in the heap.
@hakanahlstrom8310
@hakanahlstrom8310 6 лет назад
My question is this: in order to create instances of a Car, there needs to be a class named Car.java. so, in order to create Engines, there needs to be a class named Enigne.java?
@asthagarg4614
@asthagarg4614 6 лет назад
Håkan Ahlström yes of course. Since it's not a built-in class, it's our custom class.
@ashleytulloch812
@ashleytulloch812 4 года назад
WOW Thank you so much - I'm brushing up on my explanations of Java for an interview next week and this was incredible!
@incognito13567
@incognito13567 4 года назад
You are the best man and you have a very nice voice. Thanks for all! Subscribed!
@MdWahidurRahmanOvi
@MdWahidurRahmanOvi 3 года назад
Glad that I found this video. I have seen videos on LinkedLearning(Linda.com) Udemy, college classes no one explains this properly it's been 2 + years and now for the first time it makes sense to me that what this heap and stack are all about.
@maheshchoutkuri2214
@maheshchoutkuri2214 8 лет назад
Hey Thanks a lot, I am searching a lot to find what happens when we create a variable , The best explanation which I found...
@abhishekshah11
@abhishekshah11 5 лет назад
Clear and concise explanation. Very enjoyable!
@brettpenza5149
@brettpenza5149 4 года назад
This is Great. Now perhaps you can explain how the String type fits into this. Is the String type considered a reference variable or a primitive style. Does the String variable contain a reference to the heap, or is it stored completely in the Stack along with method like a primitive? Thanks.
@DhundupTseringOfficial
@DhundupTseringOfficial 4 года назад
wow this made a lot of sense, very great explanation
@azharmobeen
@azharmobeen 4 года назад
Very very well explained, Good job and please keep it up.
@mahmoudnoor3117
@mahmoudnoor3117 3 года назад
damn man you are so cool your English is fantastic even for those native English speakers continue your great job and please make new playlist tutorial
@marcus48134
@marcus48134 4 года назад
This is crystal clear and helpful. Thanks a lot.
@darkata40555
@darkata40555 4 года назад
Definitely the best explanation on youtube !!! Big thank you and subscribed ofc ;pp !!!
@philipgelinas
@philipgelinas 3 года назад
Indian Mark Ruffalo! Thx man! Good teacher.
@madhuram6328
@madhuram6328 3 года назад
Omg such a brilliant explanation explanation u deserve it 💯👍
@Leonardo-ui7bv
@Leonardo-ui7bv 4 года назад
Great video ! But I think there's a misunderstanding. Method calls are not "stored" inside the stack frame, there's only the execution of the methods. The stack frame is created only for the purpose of storing local variables and parameters. A method call is some data that you could not "store".
@diwaspoudel7
@diwaspoudel7 6 лет назад
Excellent Video!!!!!!!!!!!! Sir, But i want to know ,,,,do main class allocate memory?
@christopherhayward3078
@christopherhayward3078 4 года назад
Thank you for the video. I have a question that applies around 13:45. Let's say you define Car yourCar = myCar; (can you do this...I think so) This means myCar and yourCar point to the same memory location in the heap, as in your diagram. If you now define myCar to be a new Car(), am I correct this moves the pointer of myCar to a new slot...again as done in your video, but leaves yourCar to be pointing at your old car? Now myCar and yourCar are different cars....I am sure hope I got this.
@davidtattam687
@davidtattam687 6 лет назад
Hey man, I love your videos. Honestly they're great. Question about this particular video: you talk about the heap, and then you say how the actual data for the new Car() is maintained within the heap. But isn't a string also an object? Technically, shouldn't the data for the name string you created a couple of lines earlier also be included in the heap? Sorry I haven't finished watching the video yet, so maybe you explain this later on, but thanks in advance for letting me know if I have a point or if I'm off-point!
@nymexe
@nymexe Год назад
Finally understood 😄❤️
@asthagarg4614
@asthagarg4614 6 лет назад
Nicely explained. But what about about static variables? And what if we write- car3.engine = new Engine(); Will this line create a reference in stack under the main() frame??
@jithinjose9190
@jithinjose9190 4 года назад
You are awsome.....what a nice way of explanation..i love it...
@claudiajulietachen7905
@claudiajulietachen7905 6 лет назад
Very nice explanation! Understood all! Thank you!
@RajeshKumar28sep
@RajeshKumar28sep 3 года назад
Great work. I thought the stack grows downward.
@rizwihassan6190
@rizwihassan6190 4 года назад
gr8...and where all those static var stores?
@muhammadalirasuljonov799
@muhammadalirasuljonov799 3 года назад
The best explanation , thank u
@mohamedrawoof5093
@mohamedrawoof5093 4 года назад
One question. You haven’t created new Engine object and not assigned for my2Car object so still that Car -> Engine reference variable will be in heap memory ? It will take up some memory for my2Car object ? Really helpful if you reply Thanks
@nikosc
@nikosc 6 лет назад
What if we create the Engine object inside the Car constructor or inside another Car method. Where will the engine reference variable be stored? In heap or stack?
@chinmaysoni4416
@chinmaysoni4416 4 года назад
Very nice explanation!!
@apiautomationtester2567
@apiautomationtester2567 7 лет назад
who decides what should go to stack and what should go to heap memory ? please post basics of stack and heap memory
@dbvs007
@dbvs007 7 лет назад
nice.. very clear and you are very confident on what you say :) appreciate it and thanks again....
@adriangeorgescu7395
@adriangeorgescu7395 5 лет назад
Very easy to understand tutorial. Thanks!
@saadiyafourie
@saadiyafourie 5 лет назад
Very helpful, easy to understand and calm. Thank you very much sir.
@venkat757
@venkat757 2 года назад
Nice bro.... Excellent explanation...
@saeedmirzaei1
@saeedmirzaei1 4 года назад
Great job. Thanks so much.
@heayyyyyyy11
@heayyyyyyy11 4 года назад
Helps me so much. Thanks you
@minhmuoi352
@minhmuoi352 3 года назад
very clearly !! Thanks a lot
@COSMOPOLITANWORLD
@COSMOPOLITANWORLD 4 года назад
Thanks a lot for this great video! very understandable!
@dheerajmantena3307
@dheerajmantena3307 8 лет назад
awesome lecture....thanks much.....
@bartballon6566
@bartballon6566 3 года назад
you just saved my exam!
@keyvantahanpour5720
@keyvantahanpour5720 5 лет назад
thanks for explaining great work
@nasrinemami3237
@nasrinemami3237 6 лет назад
thanks for fluent and easy explanation
@thawhtinaung9012
@thawhtinaung9012 3 года назад
After I have studied your topic I am little confuse about how method work in stack memory.Even stack is a LIFO data structure,why methods in main method work in order forExample public static void main(String [ ]args) { System.out.println("Hello"); System.out.println("World"); } From my point of view World must appeared first after that Hello. But Why Hello appeared before World.
@harshakada3374
@harshakada3374 4 года назад
Great video, please do more of these videos
@ShadabRezashad
@ShadabRezashad 4 года назад
Very nice explained 👍👌
@onkarvadagaonkar494
@onkarvadagaonkar494 7 лет назад
Nice explaination, easy to understand
@mildtime1995
@mildtime1995 4 года назад
How Garbage collector listens for free/Left objects in the heap ? How it computes which object is freed or needs to be removed ?
@bruceskellator
@bruceskellator 5 лет назад
Thanks for the awesome explanation with examples! :)
@rafaellalinde3154
@rafaellalinde3154 7 лет назад
Great video! been looking for a good explanation for a while and finally found it.
@halamercy8594
@halamercy8594 5 лет назад
It's like listing to music not java😂😜 Ur explanation is far excellent 👌 Thank you
@codingwithnida
@codingwithnida 2 года назад
The best Explanation..
@rohandrysdale1139
@rohandrysdale1139 4 года назад
Great vid. I appreciate the clarification.
@sohampun9744
@sohampun9744 5 лет назад
Excellent Video
@maddcobra1
@maddcobra1 7 лет назад
Nice work! You are a good teacher.
@ahmedtawfik2935
@ahmedtawfik2935 5 лет назад
hello Imtiza great job but u didn't talk about String pool and many thing about the memory but really thanks about ur effort
@joshuaealy3243
@joshuaealy3243 7 лет назад
Best code expositor on youtube!
@ЮрийЛавринчук
@ЮрийЛавринчук 7 лет назад
It's the best video about stack and heap. Thnak you!
@anantgarg1116
@anantgarg1116 6 лет назад
Loved it Imtiaz Ahmad! Thanks for your efforts :)
@akimanaaimejeanbaptiste5105
@akimanaaimejeanbaptiste5105 4 года назад
Thanks very much for this video
@vijayvaswani9717
@vijayvaswani9717 8 лет назад
Very nicely explained..Thanks
@vijayvaswani9717
@vijayvaswani9717 6 лет назад
Where does variables gets value before and after object creation..? I find it difficult to understand
@hasnmbz248
@hasnmbz248 3 года назад
finally got it ! thank you
@gutenmorgan2063
@gutenmorgan2063 3 года назад
so the heap is kind of just where you store objects you created?
Далее
Memory Fundamentals - part 1 of Java Memory Management
18:31
Java - OOP Basics 1/5 (Class and Object)
13:44
Просмотров 393 тыс.
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
Просмотров 121 тыс.
GENIUS FOOD HACKS 🍰 #shorts
00:36
Просмотров 17 млн
Optionals In Java - Simple Tutorial
15:53
Просмотров 215 тыс.
Lambda Expressions in Java - Full Simple Tutorial
13:05
WHY IS THE STACK SO FAST?
13:46
Просмотров 160 тыс.
Premature Optimization
12:39
Просмотров 819 тыс.
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
Просмотров 121 тыс.