Java String CodePointAt Example
String class CodePointAt method example
String class CodePointAt method example. This example shows you how to use CodePointAt method.This method Returns the character (Unicode code point) at the specified index.
Syntax:- codePointAt(int index)
Here is the Code:-
/**
* @(#) CodePointAtstring.java
*Program Returns the character (Unicode code point) at the specified index.
* @Version 01-May-2008
* @author Rose India Team
*/
class CodePointAtstring
{
public static void main(String[] args)
{
// Declaration of String
String a="Welcome to Rose india";
//Displays the Actual String declared above
System.out.println("GIVEN STRING IS="+a);
// Returns the character (Unicode code point) at the specified index.
System.out.println("Unicode code point at position 3 IN THE STRING IS="+a.codePointAt(3));
}
} |
null
|