你可以这样做:
Scanner s = new Scanner(System.in);while (s.hasNextInt()) { A[i] = s.nextInt(); i++;}
上一篇 将字符串转换为浮点数?
下一篇 什么时候使用Thread.Sleep()是明智的?
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号