Java String Handling

Java String Concatenate Example

Java String Concatenate example shows how to concatenate strings in Java. Example also shows difference between concatenation operator (+) vs concat...

Java split string by comma example

Java split string by comma example shows how to split string by comma in Java. Example also shows how to handle CSV record having comma between...

Java String substring example

Java String substring example shows how to get substring from String in Java. Example also shows how to find substring in string and then get...

Java String keep only letters example

Java String keep only letters example shows how to keep only letters in String. Example also shows how to keep only lowercase letters, only uppercase...

Java String keep only numbers example

Java String keep only numbers example shows how to keep only numbers in String. Example also shows how to remove all non numeric characters from...

Java String replace Example

Java String replace Example shows how to replace string with other string in Java. Example also shows how to replace a character, first occurrence or...

Java String indexOf Example

Java String indexOf Example shows how to search string within string using indexOf method. Example also shows how to use indexOf to search all...

Java String Contains Example

Java String Contains Example shows how to check if String contains another String using contains method. Example also shows whether contains is case...

Java String remove last character example

Java String remove last character example shows how to remove last character from String in Java. Example also shows how to remove last 2, 3, and n...

Java split String by Pipe Example

Java split String by pipe example shows how to split String by pipe in Java. Pipe (|) has a special meaning in regular expression and it needs to be...

Java split String by dot Example

Java split String by dot example shows how to split String by dot in Java. Dot (.) has a special meaning in regular expression and it needs to be...

Convert String to title case in Java example

Convert String to title case in Java example shows how to convert string to title case in Java. Example also shows various approaches to convert...

Convert String to ArrayList in Java example

Convert String to ArrayList in Java example shows how to convert String to ArrayList in Java. Example also shows how to convert comma separated...

Check if String is lowercase in Java example

This Java example shows how to check if String is lowercase in Java. Example also shows how to check if String is lowercase using various approaches...

Check if String is uppercase in Java example

This Java example shows how to check if String is uppercase in Java. Example also shows how to check if String is uppercase using various approaches...