int num = 786;buye by = num;short sh = num;上述表达式写法是否正确?
上述表达式的写法是错误的。
正确的写法应该是:
int num = 786; byte by = (byte) num; short sh = (short) num;
原文地址: http://www.cveoy.top/t/topic/i5yN 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
上述表达式的写法是错误的。
正确的写法应该是:
int num = 786; byte by = (byte) num; short sh = (short) num;
原文地址: http://www.cveoy.top/t/topic/i5yN 著作权归作者所有。请勿转载和采集!