JAVA Series -> ASCII code table

The following sections review again on something, run the following code yourself

public static void main(String[] args) { 
    //字符类型变量 
    char c = 'a'; 
    int i = 1; 
    //字符类型和int类型计算
     System.out.println(c+i);//输出结果是98
      }

(In the process of char and an int type of calculation, the first query char type character code table, to give 97, and then a sum, the result is to enhance an int type 98.char .char Type 2 bytes of memory, int type 4 bytes of memory.)

Look at the whole ASCII table:Here Insert Picture Description
Here Insert Picture Description

This is the number corresponding ASCII table, the table does not need a lot of content there is one to remember, you only need to remember the common values, as follows:
Here Insert Picture Description

Published 37 original articles · won praise 24 · views 672

Guess you like

Origin blog.csdn.net/qq_16397653/article/details/103554938