解题思路:char在Java中占2个字节,但在这题中设定的是一个字节
注意事项:
参考代码:
public class Main{
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(Integer.SIZE/8+" "+Character.SIZE/16+" "+Float.SIZE/8+" "+Double.SIZE/8+" "+Long.SIZE/8);
}
}
0.0分
0 人评分