Character constants in Java Part -VI

 Some of the constants of the Character class in Java.

1. Character.DIRECTIONALITY_OTHER_NEUTRALS

Syntax:

byte java.lang.Character.DIRECTIONALITY_OTHER_NEUTRALS: 13

Neutral bidirectional character type "ON" in the Unicode specification.

Approach

Java

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

        System.out.println(Character.DIRECTIONALITY_OTHER_NEUTRALS);

    }
}

Output:

13


2. Character.DIRECTIONALITY_PARAGRAPH_SEPARATOR

Syntax:

byte java.lang.Character.DIRECTIONALITY_PARAGRAPH_SEPARATOR: 10

Neutral bidirectional character type "B" in the Unicode specification.

Approach

Java

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

Output:

10


3. Character.DIRECTIONALITY_POP_DIRECTIONAL_FORMAT

Syntax:

byte java.lang.Character.DIRECTIONALITY_POP_DIRECTIONAL_FORMAT : 18

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

Approach

Java

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

    }
}

Output:

18


4. Character.DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE

Syntax:

byte java.lang.Character.DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE: 22

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

Approach

Java

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

        System.out.println(Character.DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE);

    }
}

Output:

22


5. Character.DIRECTIONALITY_RIGHT_TO_LEFT

Syntax:

byte java.lang.Character.DIRECTIONALITY_RIGHT_TO_LEFT: 1

Strong bidirectional character type "R" in the Unicode specification.

Approach

Java

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

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

Output:

1


6. Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC

Syntax:

byte java.lang.Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC: 2

Strong bidirectional character type "AL" in the Unicode specification.

Approach

Java

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

        System.out.println(Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC);

    }
}

Output:

2


7. Character.PARAGRAPH_SEPARATOR

Syntax:

byte java.lang.Character.PARAGRAPH_SEPARATOR: 14

General category "Zp" in the Unicode specification.

Approach

Java

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

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

Output:

14


8. Character.PRIVATE_USE

Syntax:

byte java.lang.Character.PRIVATE_USE: 18

General category "Co" in the Unicode specification.

Approach

Java

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

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

Output:

18



Some more constants of Character class:


Character constants Part -I


Character constants Part -II


Character constants Part -III


Character constants Part - IV


Character constants Part -V


Character constants Part- VII


Character constants Part -VIII

No comments:

Post a Comment