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. Comment More infoAdvertise with us M Mohit Gupta_OMG Improve Article Tags : Misc Java Java-lang package Practice Tags : JavaMisc Similar Reads Java.lang.Character.Subset Class in Java Character.Subset Class represents particular subsets of the Unicode(standards using hexadecimal values to express characters - 16bit) character set. The subset, it defines in Character set is UnicodeBlock. Declaration : public static class Character.Subset extends Object Constructors : protected Cha 2 min read java.nio.charset.Charset Class in Java In Java, Charset is a mapping technique used in Java to map the 16-bit Unicode sequence and sequences of bytes. It is also used to encode and decode the string data text into different character encoding. It comes under java.nio.charset.Charset package. The charset must begin with a number or letter 2 min read java.nio.charset.CharsetEncoder Class in Java For the purpose of character encoding and decoding, java offers a number of classes in the 'java.nio.charset' package. The 'CharsetEncoder' class of this package performs the important task of encoding. In this article, let us understand this class, its syntax, different methods, and some examples o 6 min read java.lang.Character class - methods | Set 2 In Java, the Character Class wraps the value of a primitive data type char into an object of datatype Character. This object contains a single field having the data type char. This class provides several methods regarding character manipulations, like converting them from lowercase to uppercase. Cha 6 min read java.lang.Character Class Methods | Set 1 java.lang.Character Class wraps the value of a primitive data type char to an object of datatype Character. This object contains a single field having the data type char. This class provides several methods regarding character manipulations like converting them from lowercase to uppercase. Character 6 min read Java.net.URLEncoder class in Java This class is a utility class for HTML form encoding. Encoding makes the form of URL more reliable and secure. When the user request is triggered by a get method, the form parameters and their values are appended at the end of URL after a '?' sign. The problem arises when special characters are used 3 min read java.nio.charset.CoderResult Class in Java The 'java.nio.charset' package in Java contains classes for character encoding and decoding. The CoderResult class is used for determining the outcome of an encoding or decoding operation. Before we get started, let's review the ideas behind character encoding and decoding in CoderResult. The proces 6 min read Java.util.Locale Class in Java | Set 2 Java.util.Locale Class in Java | Set 1 More methods: getDisplayVariant() : java.util.Locale.getDisplayVariant() displays variant of the Locale Syntax : public final String getDisplayVariant() Parameters : ---- Return : ----------- getDisplayVariant(Locale in) : java.util.Locale.Locale in(Locale in) 3 min read Java.lang.String class in Java | Set 2 Java.lang.String class in Java | Set 1 In this article we would be discussing different constructor and methods provided by java.lang.String. Strings in java are immutable. Now lets discuss some of the methods provided by String class. Methods: public int codePointAt(int index) - It takes as paramet 5 min read CharMatcher Class | Guava | Java CharMatcher determines a true or false value for any Java char value. This class provides various methods to handle various Java types for char values. Declaration: The declaration for com.google.common.base.CharMatcher is as: @GwtCompatible(emulated = true) public final class CharMatcher extends Ob 3 min read Like