八大基本数据类型拓展
public class Demo03 {
public static void main(String[] args) {
int i = 10;
int i2 = 010;
int i3 =0x10;
System.out.println(i);
System.out.println(i2);
System.out.println(i3);
System.out.println("######################################");
float f = 0.1f;
double d = 1.0/10;
System.out.println(f==d);
float d1 = 231331313131313131231231f;
float d2 = d1 +1;
System.out.println(d1==d2);
System.out.println("##############################");
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 = '\u0065';
System.out.println(c3);
System.out.println("Hello\nWorld!");
System.out.println("Hello\tWorld!");
System.out.println("#######################################################");
String s1 = new String("Hello world");
String s2 = new String("Hello world");
System.out.println(s1==s2);
String s3 = "hello world";
String s4 = "hello world";
System.out.println(s3==s4);
System.out.println("#########################################");
boolean flag = true;
if(flag==true) {}
if (flag) {}
}
}