Understanding string object creation in java || introducing string constant pool || string class смотреть онлайн
In this tutorial, we will learn how many objects get created when created in string constant pool and in heap area,
when we create a string using new keyword or by using “ “ and also we will see, where the string objects get created in the memory
So let's understand the concept of string memory allocation in java -
So in the first case which is by using new keyword to create a string in java :
two string objects are created.one in the heap memory one in the string pool or inside the string constant pool.
reason for this is, first the string literal will get created inside the string constant pool and then it will be created inside the heap area as we are using the new keyword.That's because by using new keyword we are creating objects in java which is a runtime operation.
but while we try creating string in java by using string literal only one object got created and that is inside string pool.No object got created inside
heap area as no runtime things is happening.
while creating string object in java, the objects stored in the index ( string index) and we all know that the index starts from zero (0).
========
From the previous tutorial:-
We have discussed in the last tutorial What is string in java and we got some fundamental on the below stuffs.In case you missed out you can watch that in the below link
https://youtu.be/ZOnnNyJrCdQ
so there are two different ways by what we can represent a string in java and they are :
creating a string by using new keyword
creating a string with literal (known as string literals in java)
( by using above two ways we can create a string object in java )
So, string class in java present inside java lang package and comes with some special feature like immutability.In my coming tutorials, we will learn in depth that
why string is immutable in java.
string definition in java can be represented by the statement below :
A sequence of characters or a group of characters is known as string.
We can represent sequence of characters or group of characters by using 4 different ways in java and they are
1.String(java string api)
2.StringBuffer
3.StringBuilder
4.Array
=============================
follow us on facebook:
https://www.facebook.com/seleniumexpress/
Music :
-----------
credits : -
Adventures by A Himitsu https://soundcloud.com/a-himitsu
Creative Commons — Attribution 3.0 Unported— CC BY 3.0
http://creativecommons.org/licenses/b...
Music released by Argofox https://youtu.be/8BXNwnxaVQE
Music provided by Audio Library https://youtu.be/MkNeIUgNPQ8
-----
intro template :
wwww.youtube.com/Alexbau01
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Understanding string object creation in java || introducing string constant pool || string class» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.