正在加载图片...
Runtime errors import javax. swing. JOptionPane public class Test i public static void main(string[] args)i String input JOptionPane showInputDialog(null, nPlease enter an integer )i nt number Integer parseInt (input)i 如果这行出现异常,就会跳过 // Display the result 该方法中其余的行,程序终止 JOptionPane showMessageDialog(null, u The number entered is "+ number)i System. exit(o)i V程序结束Runtime Errors import javax.swing.JOptionPane; public class Test { public static void main(String[] args) { String input = JOptionPane.showInputDialog(null, "Please enter an integer"); int number = Integer.parseInt(input); // Display the result JOptionPane.showMessageDialog(null, "The number entered is " + number); System.exit(0); } } 如果这行出现异常,就会跳过 该方法 中其余的行,程序终止 程序结束
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有