整型: byte:范围为 -128 到 127。例如:byte myByte = 10; short:范围为 -32768 到 32767。例如:short myShort = 1000; int:范围为 -2147483648 到 2147483647。例如:int myInt = 100000; long:范围为 -9223372036854775808 到 9223372036854775807。例如:long myLong = 1000000000L; 浮点型: float:单精度浮点数,范围约为 3.40282347 x 10^38。例如:float myFloat = 3.14f; double:双精度浮点数,范围约为 1.797693134****1570 x 10^308。例如:double myDouble = 3.14; 字符型: char:单个字符,用单引号表示。例如:char myChar = 'A'; 布尔型: boolean:表示真或假。例如:boolean myBoolean = true;