Series: class Character

Java class Character static methods explained in simple terms with programs, screenshots

class Character

Introduction The java.lang.Character class includes many useful static methods with which text (or characters) can be manipulated. The other text manipulating classes are String, StringBuffer, StringTokenizer and StringBuilder. The Character class is a wrapper class for char data type. That is, a Character object represents char as an object; it gives an object form to …

class Character Read More »

Java Character isLetter() method Example

Java Character API comes with many methods to test whether a character is a digit or letter etc. This type of testing is useful in situations like constraints on passwords, employee id etc. To test for letter, the character class comes with isLetter(char) method. Following is the method signature as defined in java.lang.Character class. public …

Java Character isLetter() method Example Read More »

Java Character isJavaIdentifierPart() Example

Many methods exist in java.lang.Character class used for different purposes. Some methods are useful for checking the character is a digit or letter or is a uppercase letter or lowercase letter etc. At the sametime, some methods can modify the case of the letters from uppercase to lowercase or vice versa. Few more methods exist …

Java Character isJavaIdentifierPart() Example Read More »

Java Character isWhitespace() method Example

Many methods exist in java.lang.Character class used for different purposes. Some methods are useful for checking the character is a digit or letter or is a uppercase letter or lowercase letter etc. At the sametime, some methods can modify the case of the letters from uppercase to lowercase or vice versa. Few more methods exist …

Java Character isWhitespace() method Example Read More »

Java Character isLowerCase() Example

Java Character API comes with many methods to check the case of a letter – lowercase or uppercase. After checking, the character can be converted from lowercase to uppercase or uppercase to lowercase as per the need of the logic. Following is the method signature as defined in java.lang.Character class. public static boolean isLowerCase(char ch): …

Java Character isLowerCase() Example Read More »

Java Character isUpperCase() Example

Java Character API comes with many methods to check the case of a letter – lowercase or uppercase. After checking, the character can be converted from lowercase to uppercase or uppercase to lowercase as per the need of the logic. Following is the method signature as defined in java.lang.Character class. public static boolean isUpperCase(char ch): …

Java Character isUpperCase() Example Read More »

Java Character toString() Example

Java is a simple language to practice and develop more code in less time. All this is due to predefined API methods designers add in each version. Good examples are classes like String, Character, GregorianCalendar and LinkedList etc. They are designed as classes and methods are given to manipulate them. For example, addFirst() and addLast() …

Java Character toString() Example Read More »

Java Character toUpperCase() Example

Java Character API comes with many methods to convert a character’s type to another type. toUpperCase(char ch) converts lowercase ch letter to uppercase. After conversion, you can check the character is really converted or not with isUpperCase() method. If the character is already an uppercase one, it is returned as it is by the method. …

Java Character toUpperCase() Example Read More »

Java Character toLowerCase() Example

Java Character API comes with many methods to convert a character’s type to another type. toLowerCase(char ch) converts uppercase ch letter to lowercase. After conversion, you can check the character is really converted or not with isLowerCase() method. If the character is already a lowercase one, it is returned as it is by the method. …

Java Character toLowerCase() Example Read More »

Java Character getType() method Example

Many methods exist in java.lang.Character class used for different purposes. Some methods are useful for checking the character is a digit or letter or is a uppercase letter or lowercase letter etc. At the sametime, some methods can modify the case of the letters from uppercase to lowercase or vice versa. Now the present method …

Java Character getType() method Example Read More »