Character constants in Java Part -V

Some of the constants of the Character class in Java.

1. Character.DIRECTIONALITY_FIRST_STRONG_ISOLATE

Syntax:

byte java.lang.Character.DIRECTIONALITY_FIRST_STRONG_ISOLATE: 21

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

Approach

Java


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

        System.out.println(Character.DIRECTIONALITY_FIRST_STRONG_ISOLATE);

    }
}

Output:

21


2. Character.DIRECTIONALITY_LEFT_TO_RIGHT

Syntax:

byte java.lang.Character.DIRECTIONALITY_LEFT_TO_RIGHT : 0

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

Approach

Java

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

Output:

0


3. Character.DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING

Syntax:

byte java.lang.Character.DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING : 14

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

Approach

Java

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

    }
}

Output:

14


4. Character.DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE

Syntax:

byte java.lang.Character.DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE : 19

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

Approach

Java

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

    }
}

Output:

19


5. Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE

Syntax:

byte java.lang.Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE : 15

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

Approach

Java

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

    }
}

Output:

15


6. Character.DIRECTIONALITY_NONSPACING_MARK

Syntax:

byte java.lang.Character.DIRECTIONALITY_NONSPACING_MARK: 8

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

Approach

Java

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

Output:

8


7. Character.OTHER_PUNCTUATION

Syntax:

byte java.lang.Character.OTHER_PUNCTUATION: 24

General category "Po" in the Unicode specification.

Approach

Java

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

Output:

24


8. Character.OTHER_SYMBOL

Syntax:

byte java.lang.Character.OTHER_SYMBOL: 28

General category "So" in the Unicode specification.

Approach

Java

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

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

Output:

28



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 -VI


Character constants Part- VII


Character constants Part -VIII

No comments:

Post a Comment