Using toLowerCase() and toUpperCase() in Java
The method toLowerCase() converts all the characters in a string from uppercase to lowercase. The toUpperCase() method converts all the characters in a string from lowercase to upp
Read tutorialTHE TUTORIAL LIBRARY
The method toLowerCase() converts all the characters in a string from uppercase to lowercase. The toUpperCase() method converts all the characters in a string from lowercase to upp
Read tutorialThe valueOf() method converts data from its internal format into a human-readable form. It is a static method that is overloaded within String for all of Java's built-in types, so
Read tutorialYou can extract a substring using substring(). It has two forms.
Read tutorialThese two methods are overloaded in several different ways. In all cases, the methods return the index at which the character or substring was found, or 1 on failure.
Read tutorialThe comparison using equals() is case-sensitive. To perform a comparison that ignores case differences, call equalsIgnoreCase(). When it compares two strings, it considers A-Z to b
Read tutorialThe regionMatches() method compares a specific region inside a string with another specific region in another string. There is an overloaded form that allows you to ignore case in
Read tutorialString defines two routines that are, more or less, specialized forms of regionMatches(). The startsWith() method determines whether a given String begins with a specified string.
Read tutorialIt is important to understand that the equals() method and the == operator perform two different operations. As just explained, the equals() method compares the characters inside a
Read tutorialOften, it is not enough to simply know whether two strings are identical. For sorting applications, you need to know which is less than, equal to, or greater than the next. A strin
Read tutorialThe String class provides a number of ways in which characters can be extracted from a String object. Each is examined here. Although the characters that comprise a string within a
Read tutorialWhen Java converts data into its string representation during concatenation, it does so by calling one of the overloaded versions of the string conversion method valueOf() defined
Read tutorialIn general, Java does not allow operators to be applied to String objects. The one exception to this rule is the + operator, which concatenates two strings, producing a String obje
Read tutorialOne example today. A better developer tomorrow.