提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
- Convert Integer to byte
- Convert Integer to short
- Convert Integer to int
- Convert Integer to float
- Convert Integer to double
public class Main { public static void main(String[] args) {//N o w J a v a . c o m 提 供 Integer intObj = new Integer("10"); byte b = intObj.byteValue(); System.out.println(b); short s = intObj.shortValue(); System.out.println(s); int i = intObj.intValue(); System.out.println(i); float f = intObj.fl