devxlogo

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*/ 

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

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.