Some of the constants of the Character class in Java.
1. Character.COMBINING_SPACING_MARK
Syntax:
byte java.lang.Character.COMBINING_SPACING_MARK: 8
General category "Mc" in the Unicode specification.
Approach
Java
public class CharacterConstants1 {public static void main(String[] args) {System.out.println(Character.COMBINING_SPACING_MARK);}}
Output:
8
2. Character.CONNECTOR_PUNCTUATION
Syntax:
byte java.lang.Character.CONNECTOR_PUNCTUATION: 23
General category "Pc" in the Unicode specification.
Approach
Java
public class CharacterConstants1 {public static void main(String[] args) {System.out.println(Character.CONNECTOR_PUNCTUATION);}}
Output:
Approach
Java
public class CharacterConstants1 {public static void main(String[] args) {System.out.println(Character.CONTROL);}}
Output:
Approach
Java
public class CharacterConstants1 {public static void main(String[] args) {System.out.println(Character.CURRENCY_SYMBOL);}}
Output:
26
5. Character.DASH_PUNCTUATION
Syntax:
byte java.lang.Character.DASH_PUNCTUATION: 20
General category "Pd" in the Unicode specification.
Approach
Java
public class CharacterConstants1 {public static void main(String[] args) {System.out.println(Character.DASH_PUNCTUATION);}}
Output:
20
6. Character.DECIMAL_DIGIT_NUMBER
Syntax:
byte java.lang.Character.DECIMAL_DIGIT_NUMBER: 9
General category "Nd" in the Unicode specification.
Approach
Java
public class CharacterConstants1 {public static void main(String[] args) {System.out.println(Character.DECIMAL_DIGIT_NUMBER);}}
Output:
Approach
Java
public class CharacterConstants7 {public static void main(String[] args) {System.out.println(Character.MODIFIER_SYMBOL);}}
Output:
27
8. Character.NON_SPACING_MARK
Syntax:
byte java.lang.Character.NON_SPACING_MARK: 6
General category "Mn" in the Unicode specification.
Approach
Java
public class CharacterConstants7 {public static void main(String[] args) {System.out.println(Character.NON_SPACING_MARK);}}
Output:
6
Some more constants of Character class:
No comments:
Post a Comment