正在加载图片...
受检例外、执行时期例外 try i Bufferedreader buf new BufferedReader( new Input streamReader(System. in))i System.out, print("请输入整數:"); int input Integer parseInt(buf readline())i System. out. println(input x 10 ="+(input*10))i catch(IOException e) i / Checked Exception System.out. println("I/o错誤"); catch(NumberFormatException e)i // Runtime Exception System.out. println("输入必须为整數");受检例外、执行时期例外 try { BufferedReader buf = new BufferedReader( new InputStreamReader(System.in)); System.out.print("请输入整數: "); int input = Integer.parseInt(buf.readLine()); System.out.println("input x 10 = " + (input*10)); } catch(IOException e) { // Checked Exception System.out.println("I/O错誤"); } catch(NumberFormatException e) { // Runtime Exception System.out.println("输入必须为整數"); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有