一. 标识符、关键字和数据类型
1. 字符集和标识符
Java采用Unicode字符集,使用16bits存储格式
Java的标识符是以字母、下划线和$符号开头,后面含有字母、下划线、数字和$符号的字符串,标识符的长度没有限制,但是Java系统最多可以识别前255个字符。
2. 关键字
Java规定了48个普通关键字,2个保留字(const,goto),3个直接量(false,true,null)
3. 数据类型
数 据 { 基 本 数 据 { 数 值 型 { 整 数 类 型 ( b y t e 、 s h o r t 、 i n t 、 l o n g ) 浮 点 类 型 ( f l o a t 、 d o u b l e ) 字 符 类 型 ( c h a r ) 逻 辑 类 型 ( b o o l e a n ) 引 用 数 据 { 类 ( c l a s s ) 接 口 ( i n t e r f a c e ) 数 组 数据\left\{\begin{matrix}基本数据&\left\{\begin{matrix}数值型&\left\{\begin{matrix}整数类型(byte、short、int、long)\\浮点类型(float、double)\end{matrix}\right.\\字符类型(char)\\逻辑类型(boolean)\end{matrix}\right.\\引用数据\left\{\begin{matrix}类(class)\\接口(interface)\\数组\end{matrix}\right.\end{matrix}\right. 数据