java string

String Capitalize Java

Java comes with toUpperCase() and toLowerCase() methods that converts all the characters of the string into uppercase or lowercase. String Capitalize example keeps all String characters in capital letters. Following are the method signatures. String toLowerCase(): Converts all the characters of the string into lowercase. Returns a string with all…

String replaceAll() Java

This String class method, replaceAll(), replaces all the occurrences of a word in a string with another word introduced with JDK 1.4 to use with regular expressions. The method returns a new string with affected words. The original string is not disturbed (string is immutable). We discussed a similar program…

One stop destination for all String and StringBuffer

Your one stop destintation for String and StringBuffer operations. 1. String Nature: String are immutable., 2. String Operations: finding matching characters, substring, concatenation & date types conversion to string, uppercase lowercase replacing, Region Matches – Interning – Splitting. 3. StringBuffer Operations: Length and Capacity, Searching Appending and Inserting, Deleting Replacing…

Java String Immutable Comparison

Java String Immutable Comparison Summary: At the end of this tutorial "Java String Immutable Comparison", you will understand the meaning of immutable. Also you will come to know the styles of comparing Java strings. String handling and string manipulation play a vital role in programming. The simplicity in handling makes…

regionMatches() and intern() String Java

The String class is rich with abundant methods used in coding. One of the methods is overloaded regionMatches() used to find the existence of a few characters of one string in another. Supported methods from String class. boolean regionMatches(int positionFirstString, String secondString, int positionSecondString, int num): Returns a boolean value…