Java基础总结
基本类型及定义:
1 public class VarTest { 2 public static void main(String[] args) { 3 byte b = '.'; //byte会把ascii格式的字符与数字转化为数值 4 short s = 10; 5 char c = 'b'; 6 int i = 10; 7 long l = 10L; 8 float f = 1.1f; 9 double d = 1.1; 10 boolean b1 = true; 11 12 // System.out.println(b); 13 // System.out.println(c); 14 } 15 }