2:20 Java Memory 2:25 stack and heap 2:40 stack 2:52 every thread has its own stack 3:19 visualization of stack 3:59 example of how stack works 5:05 scope 6:36 all local variables are created on the stack 7:30 heap 10:44 visualization
The speaker gave this presentation in a poetic fashion. The alterations in vocal speed, pitch, and use of pause were excellent--they made the presentation more enjoyable to listen to, and easier to understand. Also aiding my understanding, was the graphics and fairly simple examples. THANK YOU!
Man you are a genius. I never thought of speeding up the videos but I tried it and you are right now I can listen to videos in a shorter amount a time. Thanks
You're quite right, the picture is misleading. args is a variable on the stack of main (which is why we've put it on the picture), but it is referencing the array, which as with all java objects, is stored on the heap. We should have drawn the object separately on the heap but I guess we thought that would overcomplicate matters.
Why String[] args stored in stack. Since array is a reference type, it's values are supposed to be stored in heap and only the reference pointer should be available in stack. Could you answer please?
Yes in this case the "abc" is interned as it is a constant string, which has obscured our explaination somewhat. The String pool is itself stored on the heap (it used to be in permgen) so you can still say that all objects are stored on the heap.It's all very confusing because of these "clever" tricks that java is performing. It's probably safest to digest the JLS here (especially 3.10.5-1):docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.5
In the case of main(String[] args) called with an argument "hello", is the memory scheme stack:args -> heap:Array[0] -> heap:String("hello")? Is the instance of args on the stack a reference type? It refers to an array of Strings on the heap, but does args on the stack have a "type"?
I love this video, but i am confused now. for example, String s = "abc"; Should the object "abc" are stored in the constant pool (method area) instead of heap ? I thought only the objects created by "new" are stored on the heap.
Yes in this case the "abc" is interned as it is a constant string, which has obscured our explaination somewhat. Sorry. The String pool is itself stored on the heap (it used to be in permgen) so you can still say that all objects are stored on the heap.It's all very confusing because of these "clever" tricks that java is performing. It's probably safest to digest the JLS here (especially 3.10.5-1):docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.5
2:20 Java Memory
2:25 stack and heap
2:40 stack
2:52 every thread has its own stack
3:19 visualization of stack
3:59 example of how stack works
5:05 scope
6:36 all local variables are created on the stack
7:30 heap
10:44 visualization
The speaker gave this presentation in a poetic fashion. The alterations in vocal speed, pitch, and use of pause were excellent--they made the presentation more enjoyable to listen to, and easier to understand. Also aiding my understanding, was the graphics and fairly simple examples. THANK YOU!
Best, best, best video on JVM's memory allocation!!
Amazing presentation skills, congratulations!
Just brilliant, give my thanks to Matt ;) cheers !!
Very nice video and it clearly explained the basics for java memory management.
I love this computer / advanced robot / perfect voice. I could speed up to 1.5 and easily understand. Thanks
This is our wonderful trainer Matt, he's honestly not a robot!
That is not a computer for sure...
The person who built that robot had a Winchester 'r':) Great video. Very helpful. Well done mates, thank you.
Man you are a genius. I never thought of speeding up the videos but I tried it and you are right now I can listen to videos in a shorter amount a time. Thanks
1.25x speed was comfortable in the latter half of the video:)
Wow...!! Very good explanation via graphics..!! Topics are easy to grasp this way..!! Thanks a lot for this...!!
Yes! now I understand. This is such an awesome tutorial. Lets follow the series n see what more I can learn. Thanks so much :)
I never leave comments. But this was SO good, THANK YOU!!!
That makes us very happy - thank you :-)
Bravo. So easy and clean.
one of the best java tutorial. awesome.
Just awesome explanation !!!!!!!!!!!!!!
Awesome way of explaining ....loved it
The first example with stack shows String[] args being in stack, however, it is an object and is stored in heap
You're quite right, the picture is misleading. args is a variable on the stack of main (which is why we've put it on the picture), but it is referencing the array, which as with all java objects, is stored on the heap. We should have drawn the object separately on the heap but I guess we thought that would overcomplicate matters.
Awesome... very interesting and great way of explaining.. pl. create such type of more videos..
Great tutorial .......Thanks a lot
Easy to understand. Awesome
Great video!!!
really its a good one to make understand and well as to like it..
Nice explanation. Thanks for the video
Nice explanation sir... Thanks for effort
wow, Great Explanation!
best explaination....Thank you.
Great Explanation!
Nicely explained
Best!
Thank you,
Great tutorial!
Good explanation.
excellent material
Excellent thanks
nice explanation
Why String[] args stored in stack. Since array is a reference type, it's values are supposed to be stored in heap and only the reference pointer should be available in stack. Could you answer please?
Yes in this case the "abc" is interned as it is a constant string, which has obscured our explaination somewhat.
The String pool is itself stored on the heap (it used to be in permgen) so you can still say that all objects are stored on the heap.It's all very confusing because of these "clever" tricks that java is performing. It's probably safest to digest the JLS here (especially 3.10.5-1):docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.5
great greaaat thanx
In the case of main(String[] args) called with an argument "hello", is the memory scheme stack:args -> heap:Array[0] -> heap:String("hello")?
Is the instance of args on the stack a reference type? It refers to an array of Strings on the heap, but does args on the stack have a "type"?
thanks sir
Nice
👍
Explain nicely
I love this video, but i am confused now. for example, String s = "abc"; Should the object "abc" are stored in the constant pool (method area) instead of heap ? I thought only the objects created by "new" are stored on the heap.
Yes in this case the "abc" is interned as it is a constant string, which has obscured our explaination somewhat. Sorry.
The String pool is itself stored on the heap (it used to be in permgen) so you can still say that all objects are stored on the heap.It's all very confusing because of these "clever" tricks that java is performing. It's probably safest to digest the JLS here (especially 3.10.5-1):docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.5
Best, best, best video on JVM's memory allocation!!