文件名称:StringIndexOutOf
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.13kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
个人原创代码:Java异常处理程序。编写Java Application程序,参考下面的程序,试修改程序,捕获相关异常,使得程序能正常运行。[提示:用错误数据测试,即可得到异常类名,运行时主方法参数输入 abc 测试]
public class StringIndexOutOf{
public static void main(String args[]){
System.out.println("字符串索引越界异常")
String str=args[0] System.out.println(“第四个字符为 ”+str.charAt(3))
int aa=Integer.parseInt(args[0]) System.out.println(“平方为 ”+aa*aa)
}
}-Personal original code: Java exception handling procedures.Write java application procedures, refer to the following program, try to modify the program to capture the relevant exception, makes the program run normally. Tip: test with the wrong data, you can get the name of the exception class, the main method arguments in the run-time input abc test]
public class StringIndexOutOf {
public static void main (String args []) {
System.out.println ("String index out of bounds exception")
String str = args [0] System.out.println ("The fourth character is" the+ str.charAt (3))
an int aa = Integer.parseInt (args [0]) System.out.println ("square"+ aa* aa) of
}
}
public class StringIndexOutOf{
public static void main(String args[]){
System.out.println("字符串索引越界异常")
String str=args[0] System.out.println(“第四个字符为 ”+str.charAt(3))
int aa=Integer.parseInt(args[0]) System.out.println(“平方为 ”+aa*aa)
}
}-Personal original code: Java exception handling procedures.Write java application procedures, refer to the following program, try to modify the program to capture the relevant exception, makes the program run normally. Tip: test with the wrong data, you can get the name of the exception class, the main method arguments in the run-time input abc test]
public class StringIndexOutOf {
public static void main (String args []) {
System.out.println ("String index out of bounds exception")
String str = args [0] System.out.println ("The fourth character is" the+ str.charAt (3))
an int aa = Integer.parseInt (args [0]) System.out.println ("square"+ aa* aa) of
}
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
StringIndexOutOf.java
本Java程序设计详细要求.txt
本Java程序设计详细要求.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.