Home Java String-examples String Determining a Character's Unicode Block



String Determining a Character's Unicode Block
Posted on: February 28, 2008 at 12:00 AM
In this section, you will get the detailed explanation about the UnicodeBlock() method of String class. We are going to use UnicodeBlock() method of String class in Java. The description of the code is given below for the usage of the method.

String Determining a Character's Unicode Block 

     

In this section, you will get the detailed explanation about the UnicodeBlock() method of String class. We are going to use UnicodeBlock() method of String class in Java. The description of the code is given below for the usage of the method.

Description of the code:

As shown in the example we have taken a Unicode of a character. Then we have applied a method UnicodeBlock() to get the character out of the code. Therefore, we get the following output. Similarly, we can take other Unicode as well for different characters and on applying this method we can get that particular character as shown below.

Here is the code of the program: 

public class charUni{
  public static void main(String args[]){
  char ch = '\u1234';
  Character.UnicodeBlock block = Character.UnicodeBlock.of(ch);
  System.out.println(ch);
  }
}

Output of the program:

C:\unique>javac charUni.java

C:\unique>java charUni
?

C:\unique>

Download this example.

Related Tags for String Determining a Character's Unicode Block:
javacstringclassunicodescriptiomethodgetiplockthisaiblockusagefornattotaillandescriptioneildessectionuseinasmouttrsagenicnicjclesexplanationageplanicolocmedetaildetailsdebatkisllivgoarcodcodestrsaxpusavascrssriringripthavbelostabatidetailedplodeono


More Tutorials from this section

Ask Questions?    Discuss: String Determining a Character's Unicode Block   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.