

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Program to determine a Character's Unicode Block
To determine a Character’s Unicode Block, use the Character.UnicodeBlock.of() method in Java. The 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.
Let us see the syntax of Character.UnicodeBlock.of() method.
Character.UnicodeBlock of(char c)
Here, c is the character.
The following is an example that shows how we can represent the Unicode block containing the given character.
Example
public class Demo { public static void main(String []args) { char ch = '\u5639'; System.out.println(ch); Character.UnicodeBlock block = Character.UnicodeBlock.of(ch); System.out.println(block); System.out.println(Character.UnicodeBlock.of(' ')); System.out.println(Character.UnicodeBlock.of('\u21ac')); System.out.println(Character.UnicodeBlock.of(1565)); } }
Output
嘹 CJK_UNIFIED_IDEOGRAPHS BASIC_LATIN ARROWS ARABIC
- Related Questions & Answers
- Java Program to Determine the Unicode Code Point at a given index
- How to find the unicode category for a given character in Java?
- How to print Unicode character in C++?
- Check whether the Unicode character is a separator character in C#
- How to fetch character from Unicode number - JavaScript?
- How to convert an integer to a unicode character in Python?
- Java Program to get a character located at the String's specified index
- How to return a number indicating the Unicode value of the character?
- Java Program to access character of a string
- Java Program to locate a character in a string
- Java Program To Determine If a Given Matrix is a Sparse Matrix
- Java program to convert a character array to string
- Java Program to determine when a Frame or Window is closing in Java
- Check whether the Unicode character is a lowercase letter in C#
- PHP – How to get the Unicode point value of a given character?
Advertisements