Java原始类型转换

要获取 获取对象 示例
Int Integer i=myInt.intValue();
Int String i = Integer.parseInt(s);
Integer String myInt = new Integer(s);
Integer Object myInt = (Integer)obj;
Object Integer obj=myInt;//by subclass substitution rule
Object String obj = s;//by subclass bustitution rule
String int s = Integer.toSting(i);
String Integer s = myInt.toString();
String Object s= (String)obj;

猜你喜欢

转载自lizhuang.iteye.com/blog/2317537