读书人

byte int long 初始化定义时的最大

发布时间: 2012-11-07 09:56:10 作者: rapoo

byte int long 初始化定义时的最大长度[回钦波 曾遗忘的知识点]

做了几年的程序,今天突然不注意中发现几个遗忘知识点.

package qinbo.testbyte;

import java.util.HashMap;

?

public class TestByte {

?

???? ?static byte = 123;
????? static int b =1234567891;

??????static long l = 1234567891;
??????static Integer b1 = new Integer("1234567891");
????? protected HashMap<Byte, Long>? t =? new HashMap<Byte,Long>();


????? public static void main(String[] args) {
?????????????? ?System.err.println(b);
??????????????? System.err.println(b1);
????? }
?
}

?

说明:这个程序是正确的,我只想再次强调的是: byte?初始化定义时最大的长度是3? , ?int?和?long?定义时最大长度是10

读书人网 >其他相关

热点推荐