Add code to check if a character is a title case character
Add the following code to the Test.java
file. This code checks whether five different Unicode codepoint characters are Titlecase characters or not.
public class Test {
public static void main(String[] args) {
int cp1 = 0x01c8;
int cp2 = 60;
int cp3 = 119;
int cp4 = 0x01c1;
int cp5 = 1232;
boolean b1 = Character.isTitleCase(cp1);
boolean b2 = Character.isTitleCase(cp2);
boolean b3 = Character.isTitleCase(cp3);
boolean b4 = Character.isTitleCase(cp4);
boolean b5 = Character.isTitleCase(cp5);
System.out.println((char) cp1 + " is a title case??: " + b1);
System.out.println((char) cp2 + " is a title case??: " + b2);
System.out.println((char) cp3 + " is a title case??: " + b3);
System.out.println((char) cp4 + " is a title case??: " + b4);
System.out.println((char) cp5 + " is a title case??: " + b5);
}
}