У нас вы можете посмотреть бесплатно What is the difference between the Heap and the Stack? или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Can you tell me the difference between the stack and the heap? Sure. So, the stack and heap are two memory components in Java. The nice thing about Java is that the memory allocation is completely up to the program; we don't have to worry about it too much unless we go really into details. But the stack and heap are these two special memory locations that Java uses, right? The stack is a place for temporary information. It's where we store things like local variables or whenever we have a method frame, where we keep track of those local variables. We also keep track of the references to objects there. So, it's kind of this temporary storage place. But the heap is one that's going to take a little bit more memory from us. When we create objects, that's the biggest thing. This heap area is where objects are stored. And then that reference is accessing the object in the heap. So, it's just a way that Java handles objects and how it's going to take memory from our computer when an application is running. Another thing about the heap is it has the string pool. This string pool is a special kind of memory built for string types specifically. Because we use character sequences a lot, a string pool area was made so that we could have an easier way to represent character sequences instead of always taking separate objects in the heap. So, yeah, these are all just memory locations in Java. Additional things you could add for this is, you can just talk about garbage collection, maybe talk about how objects work slightly. Keep in mind that, for the most part, we don't have to handle too much of the allocation and deallocation of memory in Java, but it's good to know these components and be able to talk about them and explain them a little bit. Also, mention garbage collection and how it works. That's also a popular question, so you might just get it from that side. #coding #java #cydeo Website: https://cydeo.com/ Instagram: / cydeo Linkedin: / cydeo-official Twitter: / cydeo_official Facebook: / cydeo.official