Character constants in Java Part - IV

Some of the constants of the Character class in Java.

1. Character.DIRECTIONALITY_ARABIC_NUMBER

Syntax:

byte java.lang.Character.DIRECTIONALITY_ARABIC_NUMBER: 6

Weak bidirectional character type "AN" in the Unicode specification.

Approach

Java

public class CharacterConstants2 {
    public static void main(String[] args) {

        System.out.println(Character.DIRECTIONALITY_ARABIC_NUMBER);
    }
}

Output:

6


2. Character.DIRECTIONALITY_BOUNDARY_NEUTRAL

Syntax:

byte java.lang.Character.DIRECTIONALITY_BOUNDARY_NEUTRAL: 9

Weak bidirectional character type "BN" in the Unicode specification.

Approach

Java

public class CharacterConstants2 {
    public static void main(String[] args) {
        System.out.println(Character.DIRECTIONALITY_BOUNDARY_NEUTRAL);
        
    }
}

Output:

9


3. Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR

Syntax:

byte java.lang.Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR: 7

Weak bidirectional character type "CS" in the Unicode specification.

Approach

Java

public class CharacterConstants2 {
    public static void main(String[] args) {
        System.out.println(Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR);

    }
}

Output:

7


4. Character.DIRECTIONALITY_EUROPEAN_NUMBER

Syntax:

byte java.lang.Character.DIRECTIONALITY_EUROPEAN_NUMBER: 3

Weak bidirectional character type "EN" in the Unicode specification.

Approach

Java

public class CharacterConstants2 {
    public static void main(String[] args) {
        System.out.println(Character.DIRECTIONALITY_EUROPEAN_NUMBER);

    }
}

Output:

3


5. Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR

Syntax:

byte java.lang.Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR: 4

Weak bidirectional character type "ES" in the Unicode specification.

Approach

Java


public class CharacterConstants2 {
    public static void main(String[] args) {
        System.out.println(Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR);
    
    }
}

Output:

4


6. Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR

Syntax:

byte java.lang.Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR : 5

Weak bidirectional character type "ET" in the Unicode specification.

Approach

Java

public class CharacterConstants2 {
    public static void main(String[] args) {

        System.out.println(Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR);

    }
}

Output:

5


7. Character.OTHER_LETTER

Syntax:

byte java.lang.Character.OTHER_LETTER: 5

General category "Lo" in the Unicode specification.

Approach

Java

public class CharacterConstants8 {
    public static void main(String[] args) {

        System.out.println(Character.OTHER_LETTER);
    }
}

Output:

5


8. Character.OTHER_NUMBER

Syntax:

byte java.lang.Character.OTHER_NUMBER: 11

General category "No" in the Unicode specification.

Approach

Java

public class CharacterConstants8 {
    public static void main(String[] args) {

        System.out.println(Character.OTHER_NUMBER);
    }
}

Output:

11



Some more constants of Character class:


Character constants Part -I


Character constants Part -II


Character constants Part -III


Character constants Part -V


Character constants Part -VI


Character constants Part- VII


Character constants Part -VIII

No comments:

Post a Comment