The method regionMatches() tests if the two Strings are equal. Using this method we can compare the substring of input String with the substring of… [Read More]
Java – String matches() Method example
Method matches() checks whether the String is matching with the specified regular expression. If the String fits in the specified regular expression then this method… [Read More]
Java – String toCharArray() Method example
The method toCharArray() returns an Array of chars after converting a String into sequence of characters. The returned array length is equal to the length… [Read More]
Java String trim() and hashCode() Methods with examples
In this tutorial we will discuss Java String trim() and hashCode() methods with the help of examples. Java String trim() method signature It returns a… [Read More]
Java – String getBytes() Method example
The getBytes() method encodes a given String into a sequence of bytes and returns an array of bytes. The method can be used in below… [Read More]
Java – String getChars() Method example
The method getChars() is used for copying String characters to an Array of chars. public void getChars(int srcBegin, int srcEnd, char[] dest, int destBegin) Parameters… [Read More]
Java – String toLowerCase() and toUpperCase() Methods
The method toLowerCase() converts the characters of a String into lower case characters. It has two variants: String toLowerCase(Locale locale): It converts the string into… [Read More]
Java String replace(), replaceFirst() and replaceAll() methods
In this tutorial, we will discuss replace(), replaceFirst()and replaceAll() methods. All of these Java String methods are mainly used for replacing a part of String… [Read More]
Java String split() Method with examples
Java String split method is used for splitting a String into substrings based on the given delimiter or regular expression. For example: Input String: chaitanya@singh… [Read More]
Java String substring() Method with examples
The substring() method is used to get a substring from a given string. This is a built-in method of string class, it returns the substring… [Read More]
- « Previous Page
- 1
- …
- 3
- 4
- 5
- 6
- 7
- Next Page »