Java String codePointBefore Example
String class codePointBefore method example
String class codePointBefore method example. This example shows you how to use codePointBefore method.This method Returns the character (Unicode code point) before the specified index.
Syntax:- codePointBefore(int index)
Here is the Code:-
/**
* @(#)CodePointBeforestring.java
*Program Returns the character (Unicode code point) before the specified index.
* @Version 01-May-2008
* @author Rose India Team
*/
class CodePointBeforestring
{
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) before the specified index.
System.out.println("Unicode code point at position 3 IN THE STRING IS="+a.codePointBefore(3));
}
} |
|