第1个回答 推荐于2016-01-05
public class Test{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String[] num = null; num = sc.nextLine().split(" "); int[] number = new int[num.length]; for(int i = 0; i < number.length; i++){ number[i] = Integer.valueOf(num[i]); } } }本回答被提问者采纳