public class DataType {
public static void main(String
[] args
) {
int i0
=0b10;
int i1
=10;
int i2
=010;
int i3
=0x10;
System
.out
.println(i0
);
System
.out
.println(i1
);
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
=23424223542423423f;
float d2
=d1
+1;
System
.out
.println(d1
==d2
);
System
.out
.println("=========================");
char c
='\u0061';
System
.out
.println(c
);
System
.out
.println("=========================");
String sa
=new String("helloworld");
String sb
=new String("helloworld");
String sc
="helloworld";
String sd
="helloworld";
System
.out
.println(sa
==sb
);
System
.out
.println(sc
==sd
);
}
}
转载请注明原文地址: https://lol.8miu.com/read-22031.html