Tuesday 15, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Friday, 8 May 2015

How to get Character unicode point in a String

Following example shows how to get unicode point of a character in a String using str.codePointAt(int position) method.

Sample Program

package com.javatutorialcorner.javastring;

public class StringUnicode {

public static void main(String[] args) {
String jtc = "Java tutorials corner contains tutorials for Java programers day to day needs tutorials like Java, Spring, Hibernate, String, JSON, Jackson, GSON, XML parsing, Web Service, SOAP Web Service, RESTful Web Service";
int position = 6;
System.out.println("String input : " + jtc);
System.out.println("Unicode point at position " + position
+ " in the String " + jtc.codePointAt(position));

}

}


Result


The above code will produce the following output.



String input : Java tutorials corner contains tutorials for Java programers day to day needs tutorials like Java, Spring, Hibernate, String, JSON, Jackson, GSON, XML parsing, Web Service, SOAP Web Service, RESTful Web Service
Unicode point at position 6 in the String 117

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • Java Best Practice - File OrganizationThe Java file consist of section that should be separated by blank lines and optional comments identifying each sections. Java Source file longer than 2000 lines are cumbersome and should be avoided. Java program must be prop… Read More
  • How to Write File using BufferedWriterIn this tutorials we are going to see how to write file using BufferedWriter in Java. 1.Create project called JavaMisc. 2.Create package called com.javatutorialscorner.io Create java class called FileWriter under co… Read More
  • Reading the file using FileInputStreamIn this tutorials we are going to see how to read file using FileInputStream. Create project called JavaMisc. Create package called com.javatutorialscorner.io Create java class called FileReader under com.javatutorialscorner.… Read More
  • Sending HTML Email using Java Mail APIIn this tutorials we are going to see how to send the HTML email message using Java program.I used gmail SMTP server for sending email, you can use any SMTP server(provided by your host provider).The javax.mail.*; package use… Read More
  • Java Best Practice – White SpacesBlank LinesBlank lines improved readability by setting off sections of code that are locally related.Two blank lines should always be used in the following circumstances:Between sections of source file Between class and inter… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: How to get Character unicode point in a String Rating: 5 Reviewed By: eHowToNow