public class DataTypeDemo{ public static void main(String[] args){ //byte a = 128; 错误 //short b = 32768; 错误 //int a = 3111111111; 错误 //long a = 3111111111L; /*float f1 = 3.3452321123123f; float f2 = 3.345232112312321321f; System.out.println(f1 == f2); //字符类型 char a = 'B'; System.out.println(a == 66); //字符串类型,一个字符序列 //String A = "AB"; //System.out.println(A); char ch1 = 't';//转义符 System.out.println("[" + ch1 + "]"); char ch2 = 'u0009'; //转义符 System.out.println("[" + ch2 + "]"); System.out.println(""abc""); int a1 = 10; boolean flag = true; System.out.println((a1 == 10) == flag); } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)