simplepaul
Scanner s = new Scanner(System.in);
int choice = 0;

if(s.hasNextInt()) 
{
   choice = s.nextInt();
}

s.close();//关闭scanner

 

分类:

技术点:

相关文章:

  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2022-02-10
  • 2022-12-23
  • 2021-04-30
  • 2021-07-21
  • 2021-11-29
猜你喜欢
  • 2022-12-23
  • 2021-11-05
  • 2021-11-29
  • 2021-11-29
  • 2021-12-03
  • 2022-01-06
相关资源
相似解决方案