Byte(String s) 
          Constructs a newly allocated Byte object that represents the byte value indicated by the String parameter.
------------------------------------------------------------------------------
Byte构造函数规定的参数为String,使用应该用"111"

解决方案 »

  1.   

    这样定义也成,Byte var = new Byte(111)   但前提是JDK只提供了楼上所说的方法,只有自己重写Byte类了,按自己的方式实现。
      

  2.   

    public Byte(byte value)Constructs a newly allocated Byte object that represents the specified byte value.For byte, from -128 to 127, inclusive在这个范围内 构造这个也可以,JDK 1.4支持。
      

  3.   

    犯了个错误,应该是这样:   Byte b=new Byte((byte)127);    因为127缺省当做了int 类型,必须在这里强制转换为Byte.