String Programs
String comparison, concatenation, substring, reverse and character handling.
Check Case of a Character Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
String Reverse Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Trim a String Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Repetitions in String Example in Java
Repetitions in String in Java: a complete example program with source code and sample output, explained step by step.
First Repeated Character Example in Java
First Repeated Character explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
String Buffer Example in Java
StringBuffer class is a mutable class unlike the String class which is immutable. A Java example with source code and sample output.
String Builder Example in Java
To avoid unnecessary memory usage, StringBuilder class is used. A Java example with source code and sample output.
String Comparison Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Convert a String to Array Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Equals and Equalsignorecase Example in Java
One of the String comparison methods is '.equals' method. A Java example with source code and sample output.
Convert String to Arraylist Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Convert String to Lowercase Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
String to Characterarray Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Convert to Uppercase Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Find the Character at a Particular Index Example in Java
This method charAt() returns character at a particular index in the string. A Java example with source code and sample output.
Find Index of a Particular Character Example in Java
This method indexOf() is an inbuilt method of strings which is used to find the index of a particular character or string.
Find Index of a Particular String Example in Java
This method indexOf() is an inbuilt method of strings which is used to find the index of a particular character or string.
Replace Character in a String Example in Java
Replace Character in a String explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
String Concatenation Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
String Length Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
Capitalize the Starting Letter of Each Word in a Sentence Example...
A string can be converted to uppercase using .toUpperCase() method. A Java example with source code and sample output.
Convert Character Array to String Example in Java
Convert Character Array to String explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Check Input Strings Are Anagram or Not Example in Java
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. A Java example with source code and sample output.
String Equals vs == Operator Example in Java
Understand the difference between == and equals() for String comparison in Java, with examples showing reference equality vs content equality and sample output.