作业帮 > 综合 > 作业

java编程的问答DataType compatability RULE – large types can usual

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/29 08:59:58
java编程的问答
DataType compatability RULE – large types can usually store small types
32 is a divisor of 64
EXCEPTION – integer types cannot store decimals without a cast
In the blanks below,write in the data types that could fill the blank that would not require a cast.
1.char c = < blank > ___________________________________________
2.byte b = < blank > ___________________________________________
3.short s = < blank > ___________________________________________
4.int i = < blank > ___________________________________________
5.long r = < blank > ___________________________________________
6.float f = < blank > ___________________________________________
7.double d = < blank > ___________________________________________
8.int a = (int)56.67; out.println(a); _________________________
9.long u = (int)56.67; out.println(u); _________________________
10.char p = ‘A’+100; out.println((int)p); _________________________
11.double g = 56.67d; out.println(g); _________________________
12.float v = (int)56.67; out.println(v); _________________________
字符型
字节
短整型
整形
长整形
浮点型
双精度浮点型
56
56
165
56.67
56.0