Last Updated : 13 Sep, 2023
Character.UnicodeBlock Classrepresents particular
Character blocksof the Unicode(standards using hexadecimal values to express characters - 16 bit) specifications. Character Blocks define characters used for specific purpose.
Declaration :public static final class Character.UnicodeBlock extends Character.SubsetMethods of Character.UnicodeBlock Class :
public static final Character.UnicodeBlock forName(String block) Parameters : block : Name of UniCode Block. Return : instance of UniCode Block. Exception : -> IllegalArgumentException -> NullPointerException
public static Character.UnicodeBlock of(char ch) Parameters : ch : character to be found. Return : returns the UniCode Block or null. Exception : -> IllegalArgumentException
public final String toString() Parameters : --- Return : returns the object having the argumented UniCode - Point or null Exception : -> IllegalArgumentException
// Java Program illustrating the use of
// Character.UnicodeBlock class Methods.
import java.lang.*;
public class CharacterSubsetDemo
{
public static void main(String[] args)
{
// Use of forName() :
// returns Unicode Blocks, as per Unicode Standards
System.out.println("Using UnicodeBlock.forName() : ");
System.out.println(Character.UnicodeBlock.forName("OLDITALIC"));
System.out.println(Character.UnicodeBlock.forName("NUMBERFORMS"));
System.out.println(Character.UnicodeBlock.forName("MALAYALAM") + "\n");
// Use of(char ch) :
System.out.println("Using UnicodeBlock.of(char ch) : ");
System.out.println(Character.UnicodeBlock.of(' '));
System.out.println(Character.UnicodeBlock.of('\u21ac') + "\n");
// Use of(int UCPoint) :
System.out.println("Using UnicodeBlock.of(int UCPoint) : ");
System.out.println(Character.UnicodeBlock.of(1609));
System.out.println(Character.UnicodeBlock.of(1565));
}
}
Output :
Using UnicodeBlock.forName() : OLD_ITALIC NUMBER_FORMS MALAYALAM Using UnicodeBlock.of(char ch) : BASIC_LATIN ARROWS Using UnicodeBlock.of(int UCPoint) : ARABIC ARABICNote :
lang.Character.UnicodeBlock Class inherits others methods from
lang.Character.Subset Classclass which in turn inherits methods from
lang.Character.Objectclass. For further details about java.lang.Object, refer :
lang.Character.Subset Class in Java.
Object class in Java.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4