3:50 pm - Sunday February 19, 7634

Character Example Program for codePointAt(CharSequence seq,int index)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/*Character Example Program for codePointAt(CharSequence seq,int index)*/
/**
 *@Author:CandidJava.com
 *@description:find the codepoint to given string using CodeAtPoint class
 */
public class CodePointAt {
	public static void main(String args[]) {
		String str = "adsdfrrgtgtkj";// get string
		int d = str.codePointAt(3);// return the code point at index 3
		int d1 = str.codePointAt(5);// return the code point at index 5
		int d2 = str.codePointAt(4);// return the code point at index 4
		System.out.println(d + " " + d1 + " " + d2);
	}
}

OUTPUT:
100 114 102

Filed in: Z-A All Java Codes

Comments are closed.