Java String Class
Java String class provides methods to handle the string processing in Java Progams.
String class in Java
This Page discusses about Java String. Learn Java String with Example and sample codes.
String class in one of the most important class in the Java api. String class provides the functions to manipulate strings in Java Program.
String class also supports + and += operations, which makes it unique. In the following program example I will show you how you can perform + and += operations on String object.
String + operation:
String s1= "Coding";
String s2="Diary.com"
String s=s1+s2;
//Now the value of s is "CodingDiary.com"
Example of += Operation:
String s1="Coding";
String s1+="Didary.com";
Now the value of s1 is "CodingDiary.com";
|