Java codePointAt equivalent for charcodeat

Java codePointAt equivalent for charcodeat

Get the Ascii code of a character in Java

/**
 * @author lautturi.com
 * Java example: get ascii code in java
 */

import java.util.*;

public class Lautturi {
	public static void main(String[] args) {
		
		String str = "hello lautturi world!";
		int codePointAt0 = Character.codePointAt(str, 0);
		System.out.println(codePointAt0);
		
	}
}
Sour‮w:ec‬ww.lautturi.com

output:

The ascii code of h is 104:

104
Created Time:2017-09-02 20:33:39  Author:lautturi