RUVIDEO
Поделитесь видео 🙏

How to Use String in Java (Hindi) | String Pool | String memory management смотреть онлайн

📁 Обучение 👁️ 16 📅 05.12.2023

Thanks for watching the video:
Subscribe Channel: https://youtube.com/c/StudyAutomation1

My Gadgets:
MIC:- https://amzn.to/3UQPlaF
Camera:- https://amzn.to/3WYszQ3
Laptop:- https://amzn.to/3EsPzzt he Java String data type can contain a sequence (string) of characters, like pearls on a string. Strings are how you work with text in Java.
Strings in Java are represented internally using bytes, encoded as UTF-16. UTF-16 uses 2 bytes to represent a single character. UTF is a character encoding that can represent characters from a lot of different languages (alphabets).
Creating a String
Strings in Java are objects. Therefore you need to use the new operator to create a new Java String object. Here is a Java String instantiation (creation) example:
String myString = new String("Hello World");
The text inside the quotes is the text the String object will contain.
Java String Literals
Java has a shorter way of creating a new String:
String myString = "Hello World";
Instead of passing the text "Hello World" as a parameter to the String constructor, you can just write the text itself inside the double quote characters. This is called a String literal. The Java compiler will internally figure out how to create a new Java String representing the given text.
Escape Characters
Java Strings literals accepts a set of escape characters which are translated into special characters in the created String. These escape characters are:
Esc. Char Description
\\ Translated into a single \ character in the String
\t Translated into a single tab character in the string
\r Translated into a single carriage return character in the string
\n Translated into a single new line character in the string
Here is an example of creating a Java String using escape characters:
String text = "\tThis text is one tab in.\r\n";
This String literal will result in a String that starts with a tab character and ends with a carriage return and a new line character.

Concatenating Strings
Concatenating Strings means appending one string to another. Strings in Java are immutable meaning they cannot be changed once created. Therefore, when concatenating two Java String objects to each other, the result is actually put into a third String object.
Here is a Java String concatenation example:
String one = "Hello";
String two = "World";

String three = one + " " + two;
The content of the String referenced by the variable three will be Hello World; The two other Strings objects are untouched.
String Length
You can obtain the length of a String using the length() method. The length of a String is the number of characters the String contains - not the number of bytes used to represent the String. Here is an example:
String string = "Hello World";
int length = string.length();
Substrings
You can extract a part of a String. This is called a substring. You do so using the substring() method of the String class. Here is an example:
String string1 = "Hello World";

String substring = string1.substring(0,5);

For more blogs:
https://studyautomation.com

Also you can visit my Udemy courses:

https://www.udemy.com/course/java-for-everyone-zero-to-hero/?referralCode=2F7E34E786809315A6A5

https://www.udemy.com/course/selenium-webdriver-with-maven-jenkins-git-cucumber/?referralCode=AAC52F11D91841300A27

https://www.udemy.com/course/complete-java-bootcamp-go-from-zero-to-hero-with-spring/?referralCode=6C6A02D0E42A56ACEB91


Thanks,

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to Use String in Java (Hindi) | String Pool | String memory management» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.