In this video, I have explained What is a string variable in Java & it's methods.
Definition:
String is a variable contains a collection of characters/text surrounded by double quote.
For example String s = “JavaSession”;
In Java, String is basically an object which provides a lot of methods that can perform specific operations on strings such as
compare(), concat(), equals(), split(), length(), toUpperCase(), toLowerCase() etc.
String Concatenation:
In Java, String concatenation forms a new String that is the combination of multiple strings. There are two ways to concatenate strings in Java:
i. By + operator
ii. By concat() method
Note: Java uses the + operator for both addition and concatenation.
Always remember: Numbers are added. Strings are concatenated
If you add two numbers, the result will be a number
If you add two strings, the result will be a string concatenation
If you add a number and a string, the result will be a string concatenation:
Nesta página do site você pode assistir ao vídeo on-line #9 What is String in Java duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Nilesh Kavankar 18 Junho 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 87 vezes e gostou 1 espectadores. Boa visualização!