轉換方法如下: a="12345"; int i; (視頻教程推薦:java視頻) 方法一: i=Integer.parseInt(a); 方法二: i=Integer.valueOf(a).intValue(); 推薦教程:java入門程序