package com.yichang;
import java.util.*;
public class Test2 {

    public static void main(String[] args) {
        
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入数字:");
        try{
        int a =sc.nextInt();
        System.out.println("输入的是:"+a);
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
            System.out.println("输入的类型错误"+ex.getMessage());
        }
    
    

    }

}

 

相关文章:

  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-20
  • 2021-11-11
  • 2022-12-23
  • 2021-11-21
  • 2021-08-09
  • 2021-07-27
  • 2022-02-26
相关资源
相似解决方案