Java.lang.Character.UnicodeBlock Class in Java Last Updated : 13 Sep, 2023 Comments Improve Suggest changes Like Article Like Report Character.UnicodeBlock Class represents particular Character blocks of 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.Subset Methods of Character.UnicodeBlock Class : forName() : java.lang.Character.UnicodeBlock.forName() returns the name of Unicode Blocks, which are determined by the Unicode Standards. The method accepts argument as Canonical Block as per Unicode Standards. Syntax : public static final Character.UnicodeBlock forName(String block) Parameters : block : Name of UniCode Block. Return : instance of UniCode Block. Exception : -> IllegalArgumentException -> NullPointerException of(char ch) : java.lang.Character.Subset.of(char ch) returns the UniCode Block having the argumented character or null if the character is not a part of any defined Unicode Block. Syntax : public static Character.UnicodeBlock of(char ch) Parameters : ch : character to be found. Return : returns the UniCode Block or null. Exception : -> IllegalArgumentException of(int UCPoint) : java.lang.Character.Subset.of(int UCPoint)returns the object having the argumented UniCode - Point or null if the character is not a part of any defined Unicode Block. Syntax : public final String toString() Parameters : --- Return : returns the object having the argumented UniCode - Point or null Exception : -> IllegalArgumentException Java // 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 ARABIC Note : lang.Character.UnicodeBlock Class inherits others methods from lang.Character.Subset Class class which in turn inherits methods from lang.Character.Object class. For further details about java.lang.Object, refer : lang.Character.Subset Class in Java. Object class in Java. Create Quiz Comment M Mohit Gupta 0 Improve M Mohit Gupta 0 Improve Article Tags : Misc Java Java-lang package Explore Java BasicsIntroduction to Java3 min readJava Programming Basics9 min readJava Methods6 min readAccess Modifiers in Java4 min readArrays in Java7 min readJava Strings7 min readRegular Expressions in Java3 min readOOP & InterfacesClasses and Objects in Java5 min readAccess Modifiers in Java4 min readJava Constructors4 min readJava OOP(Object Oriented Programming) Concepts10 min readJava Packages2 min readJava Interface7 min readCollectionsCollections in Java12 min readCollections Class in Java13 min readCollection Interface in Java4 min readIterator in Java4 min readJava Comparator Interface5 min readException HandlingJava Exception Handling6 min readJava Try Catch Block4 min readJava final, finally and finalize4 min readChained Exceptions in Java3 min readNull Pointer Exception in Java5 min readException Handling with Method Overriding in Java4 min readJava AdvancedJava Multithreading Tutorial3 min readSynchronization in Java7 min readFile Handling in Java4 min readJava Method References9 min readJava 8 Stream Tutorial7 min readJava Networking6 min readJDBC Tutorial5 min readJava Memory Management3 min readGarbage Collection in Java6 min readMemory Leaks in Java3 min readPractice JavaJava Interview Questions and Answers15+ min readJava Programs - Java Programming Examples7 min readJava Exercises - Basic to Advanced Java Practice Programs with Solutions5 min readJava Quiz1 min readJava Project Ideas For Beginners and Advanced15+ min read Like