The Character.isMirrored(int codePoint) is an inbuilt method in java that determines whether the specified character (Unicode code point) is mirrored according to the Unicode specification. Mirrored characters should have their glyphs horizontally mirrored when displayed in text that is right-to-left. For example, ‘\u0028’ LEFT PARENTHESIS is semantically defined to be an opening parenthesis. This will appear as a “(” in text that is left-to-right but as a “)” in text that is right-to-left.
public static boolean isMirrored(int codePoint)
Parameters: The parameter codePoint of integer type is the character (Unicode code point) to be tested.
Return Value: This method returns true if the character is mirrored, false if the character is not mirrored or is not defined.
Below programs illustrates the Character.isMirrored() method:
char1 represents a mirrored character is false char2 represents a mirrored character is false
c1 represents a mirrored character is false c2 represents a mirrored character is false
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.