
- Java.lang - Home
- Java.lang - Boolean
- Java.lang - Byte
- Java.lang - Character
- Java.lang - Character.Subset
- Java.lang - Character.UnicodeBlock
- Java.lang - Class
- Java.lang - ClassLoader
- Java.lang - Compiler
- Java.lang - Double
- Java.lang - Enum
- Java.lang - Float
- Java.lang - InheritableThreadLocal
- Java.lang - Integer
- Java.lang - Long
- Java.lang - Math
- Java.lang - Number
- Java.lang - Object
- Java.lang - Package
- Java.lang - Process
- Java.lang - ProcessBuilder
- Java.lang - Runtime
- Java.lang - RuntimePermission
- Java.lang - SecurityManager
- Java.lang - Short
- Java.lang - StackTraceElement
- Java.lang - StrictMath
- Java.lang - String
- Java.lang - StringBuffer
- Java.lang - StringBuilder
- Java.lang - System
- Java.lang - Thread
- Java.lang - ThreadGroup
- Java.lang - ThreadLocal
- Java.lang - Throwable
- Java.lang - Void
- Java.lang Package Useful Resources
- Java.lang - Useful Resources
- Java.lang - Discussion
Java Character.UnicodeBlock Class
The Java Character.UnicodeBlock class is a family of character subsets representing the character blocks in the Unicode specification. Character blocks generally define characters used for a specific script or purpose.
Class Declaration
Following is the declaration for java.lang.Character.UnicodeBlock class −
public static final class Character.UnicodeBlock extends Character.Subset
Class Methods
Sr.No. |
Method & Description |
---|---|
1 |
This method returns the UnicodeBlock with the given name. |
2 |
This method returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block. |
2 |
This method returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block. |
Getting UnicodeBlock using Block Names Example
The following example shows the usage of Java Character.UnicodeBlock forName() method.
package com.tutorialspoint; public class CharacterUnicodeBlockDemo { public static void main(String[] args) { // returns the UnicodeBlock instance with blockName "BASIC_LATIN" System.out.println(Character.UnicodeBlock.forName("BASIC_LATIN")); // returns the UnicodeBlock instance with blockName "BasicLatin" System.out.println(Character.UnicodeBlock.forName("BasicLatin")); // returns the UnicodeBlock instance with specified blockName System.out.println(Character.UnicodeBlock.forName("ARABIC")); System.out.println(Character.UnicodeBlock.forName("MUSICALSYMBOLS")); System.out.println(Character.UnicodeBlock.forName("TAMIL")); } }
Let us compile and run the above program, this will produce the following result −
BASIC_LATIN BASIC_LATIN ARABIC MUSICAL_SYMBOLS TAMIL