文件名称:StringIndexOutOf
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 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