000034:将所有整型数值全部转换成int型输出

来源:互联网 发布:snmp 监控软件 编辑:程序博客网 时间:2024/06/03 15:50
public class Trace {    public static void main (String args[]){        byte mybyte = 124;        short myshort = 1234;        long mylong = 12345;        int myint1 = (int) mybyte;        int myint2 = (int) myshort;        int myint3 = (int) mylong;        System.out.println(myint1 + myint2 + myint3);    }}
阅读全文
0 0
原创粉丝点击