我是来自 PHP 的 Java 新手,所以花一些时间/精力来理解类型。然后我遇到了这个:
Byte bb = new Byte("127");
System.out.println(bb.byteValue());
Short ss = new Short("32727");
System.out.println(ss.shortValue());
System.out.println(ss.byteValue());
输出 127、32727 和 -41 ?
当 Short 32727 表示为一个字节时,有人可以向我解释它是如何到达 -41 的吗?