数据类型的拓展
整数拓展
int i = 10;
int i2 = 010;
int i3 = 0x11;
System.out.println(i);
System.out.println(i2);
System.out.println(i3);
浮点数拓展
float f = 0.1f;
double d = 1.0/10;
System.out.println(f == d);
float d1 = 1145141919810f;
float d2 = d1 + 1;
System.out.println(d1 == d2);
字符拓展
char c1 = 'a';
char c2 = '中';
System.out.println(c1);
System.out.println((int)c1);
System.out.println(c2);
System.out.println((int)c2);
char c3 = '\u0061';
System.out.println(c3);
转义字符
System.out.println("Hello\tWorld!");
对象
String sa = new String("hello world");
String sb = new String("hello world");
System.out.println(sa == sb);
String sc =("hello world");
String sd =("hello world");
System.out.println(sc == sd);
布尔值扩展
boolean flag = true;
if(flag==true){}
if(flag){}