//---- Object可以通過(guò)基本類型賦值
int the_int = 0;
Object o = the_int;
//---- Object強(qiáng)制轉(zhuǎn)換成基本類型不成功
the_int = (int)o;
//---- Object轉(zhuǎn)int的方法
public class ObjectTest {
public static void main(String [] args)
{
Object code = "4";
int codeInt = Integer.parseInt((String) code);
System.out.println(codeInt );
}
}