devxlogo

Identifying the Unicode of Characters in a Given String

Identifying the Unicode of Characters in a Given String

The String class facilitates finding the unicode of characters in a String using the codePointAt method.

Listing 1. Finding Unicode Characters

public class StringCodePoint{   public static void main(String args[])   {      StringCodePoint stringCodePoint = new StringCodePoint();      stringCodePoint.proceed();   }      private void proceed()   {      String name = "ABC"; //Defining  a String with value ABC      System.out.println("CodePoint of A : " + name.codePointAt(0)); //0 is the starting index    }}/*Expected output:[root@mypc]# java StringCodePointCodePoint of A : 65*/ 
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist