ASCII code

Reference:
-- How to get the ASCII value of a string with javahttps : //www.cnblogs.com/amosli/p/3832817.html --Escape character
https://baike.baidu.com/item/%E8 %BD%AC%E4%B9%89%E5%AD%97%E7%AC%A6/86397?fr=aladdin



/**
 * Mutual conversion between characters and ASCII code values
 */
public class Char2Ascii {
	public static void main(String[] args) {
		//1. The ASCII code of the character can be directly converted to an integer int
		char a='h';
		int b=a;
		System.out.println(b);//Output: 104
		//2. Convert ASCII code value to character
		char c=(char) Integer.parseInt("104");
		System.out.println(c);//Output: h
	}
}


--[The difference between ASCII and Unicode]
https://zhidao.baidu.com/question/588415303.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326171973&siteId=291194637