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