Java????????????
?????chenssy ???????[ 2016/7/12 11:38:07 ] ??????????????????? ??
??????Exception??????????????????????????CheckedException????????????????UncheckedException?????????????????CheckException??????????危?????????try…catch??????throws????????????????UncheckedException????????????????胁?????????????????????????????????????????椋�???????????????????????????????????????????????????????????婵�????煤?写???????????????????????????????????????????????????????
??????????????????????????????????CheckedException?????????????????????????????????????????????????RuntimeException????
????java??????????????????????????????????????????????????????????java?芯????????????????位???????
????????????
??????????????????????笑????????????????????????????try????catch???????????????????????????????????????????????????try…catch?????????????????????????????????try…catch????????芯?try…catch????????????????
??????????try????????????????????椋琧atch?榀�????????????写????????????????
public class ExceptionTest {
public static void main(String[] args) {
String file = "D:\exceptionTest.txt";
FileReader reader;
try {
reader = new FileReader(file);
Scanner in = new Scanner(reader);
String string = in.next();
System.out.println(string + "????????????????械???.....");
} catch (FileNotFoundException e) {
e.printStackTrace();
System.out.println("?????????胁???...");
}
finally{
System.out.println("finally ?????...");
}
}
}
????????畏???????????????D?????渭?exceptionText.txt?????????????械???????????????D????懈?????????谐????????锟�?
????java.io.FileNotFoundException: D:exceptionTest.txt (?????????????????)
????at java.io.FileInputStream.open(Native Method)
????at java.io.FileInputStream.<init>(FileInputStream.java:106)
????at java.io.FileInputStream.<init>(FileInputStream.java:66)
????at java.io.FileReader.<init>(FileReader.java:41)
????at com.test9.ExceptionTest.main(ExceptionTest.java:19)
?????????????胁???...
????finally ?????...
????????????????????????些??
????1????????????????????????????校???????????????校?????????????????????????
????2??catch????????????????????
????????????D????????????exceptionTest.txt????????谐????????锟�?
????1111????????????????械???.....
????finally ?????...
????11111???????械??????????????薪??????贸?????????????????????????finally????????????小?????finally???????????????
????????????????????3???
????public class ExceptionTest {
????public static void main(String[] args) {
????int[] a = {1??2??3??4};
????System.out.println(a[4]);
????System.out.println("????????????");
????}
????}
???????????薪????
????Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
????at com.test9.ExceptionTest.main(ExceptionTest.java:14)
??????位?????????????????????????????????????????????????????????
????java.io.FileNotFoundException: D:exceptionTest.txt (?????????????????)
????Exception in thread "main" <strong>java.lang.ArrayIndexOutOfBoundsException:</strong> 4
???????????????????????????????????????????????????Exception in thread ”main”???????????????????位?谩??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????Java?????????????????????????????????????????????try…catch??throw??throws??????位??????????????
???????????????????????婕�???????????????????SPASVO小??(021-61079698-8054)?????????????????????????
??????
Java???????????些???????????????Java????????????????Java?斜???Map????????Java Web???????????????Java??????????????写?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??位????????鈥�????械?????Java??写??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?屑????????????????java???????眉???????????屑???????????????????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????械????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????