关键字22 异常处理 catch finally throw 字面值常量 throws s日 true null 对象相关关键字 new 方法相关关键字 extends return implements void class 包相关关键字 instanceof package this import super 6 北大青鸟
6 关键字2-2 • 异常处理 - try - catch - finally - throw - throws • 对象相关关键字 - new - extends - implements - class - instanceof - this - super • 字面值常量 - false - true - null • 方法相关关键字 - return - void • 包相关关键字 - package - import
基本数据类型 Java共有八种基本数据类型: 四种整数类型(byte、 short、int、long) 两种浮点数类型(loat、 double 一种字符类型(char) 种布尔类型( boolean 北大青鸟
7 基本数据类型 • Java 共有八种基本数据类型: - 四种整数类型(byte、short、int、long) - 两种浮点数类型(float、double) - 一种字符类型(char) - 一种布尔类型(boolean)
整型数据类型 类型|缺省值长度 数的范围 byte 8位 128~127 short 0000 16位 32,768~32767 32位 2,147,483648~2,147,483,647 long 64位 9,223,372,036,854,775808 9,223,372,036854,775807 北大青鸟
8 整型数据类型 类型 缺省值 长度 数的范围 byte 0 8位 -128 ~ 127 short 0 16位 -32,768 ~ 32,767 int 0 32位 -2,147,483,648 ~ 2,147,483,647 long 0 64位 -9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807
浮点型数据类型 类型缺省值长度 数的范围 float 0.0 32位 3.4E0383.4E+038 double 0.0 64位 17E-308~1.7E+308 北大青鸟
9 浮点型数据类型 类型 缺省值 长度 数的范围 float 0.0 32位 3.4E-038~3.4E+038 double 0.0 64位 1.7E-308~1.7E+308
宇符数据类型 类型缺省值长度 数的范围 char "\u0000 16位 \u0000 luffy 北大青鸟
10 字符数据类型 类型 缺省值 长度 数的范围 char '\u0000' 16位 \u0000 ~ \uFFFF