實(shí)驗(yàn)12 異常處理 12.1 實(shí)驗(yàn)?zāi)康? (1)掌握異常處理的編程特點(diǎn)。 (2)了解Java異常分類層次,常見系統(tǒng)異常。 (3)了解自定義異常的定義及方法異常的拋出與處理。 12.2 知識(shí)要點(diǎn) Java把異常加入Java語(yǔ)言的體系結(jié)構(gòu),為異常定義了類和關(guān)鍵字,簡(jiǎn)化了錯(cuò)誤處理代碼。將錯(cuò)誤處理從正常的控制流中分離出來,對(duì)錯(cuò)誤實(shí)施統(tǒng)一處理。 12.2.1異常處理結(jié)構(gòu) TRY { 語(yǔ)句塊; } catch (異常類名1 參變量名) { 語(yǔ)句塊; } catch (異常類名2 參變量名) { 語(yǔ)句塊; } finally { 語(yǔ)句塊; } 說明: (1)finally總是執(zhí)行,它是異常處理的統(tǒng)一出口,常用來實(shí)現(xiàn)資源釋放,文件關(guān)閉等。 (2)發(fā)生異常時(shí)TRY塊內(nèi)的后續(xù)語(yǔ)句不再執(zhí)行; (3)catch按照次序進(jìn)行匹配檢查處理,找到一個(gè)匹配者,不再找其它;catch的排列要按照先個(gè)別化再一般化的次序。不能將父類異常排在前、子類異常排在后。 12.2.2 常見系統(tǒng)異常 常見系統(tǒng)異常如表12-1所示。 表12-1 常見系統(tǒng)異常
標(biāo)簽: 12.1 Java 實(shí)驗(yàn) 異常處理
上傳時(shí)間: 2013-12-09
上傳用戶:jhksyghr
學(xué)生公寓管理系統(tǒng)使用說明: 1.服務(wù)器運(yùn)行環(huán)境 SQL 2000 .NET FRAMEWORK 1.1 .NET FRAMEWORK 1.1 CHINESE (SIMPLIFIED) LANGUAGE WINDOWS信使 IIS 開發(fā)環(huán)境:Windows XP Microsoft Visual Studio .NET 2003 SQL Server 2000 2.使用方法 附數(shù)據(jù)庫(kù)Manage,文件夾為DB,用戶名為sa,密碼為空。 3.通過信使將Manage文件夾添加為虛擬目錄。 起始頁(yè)是Login.aspx 網(wǎng)站的系統(tǒng)管理員帳號(hào)和密碼分別是: admin admin 網(wǎng)站的管理員帳號(hào)和密碼有很多,其中一個(gè)是:1 1 網(wǎng)站的學(xué)生帳號(hào)和密碼有很多,其中一個(gè)是: 3 12345678 制作說明: 1.由于時(shí)間倉(cāng)促,為了做一個(gè)完整的系統(tǒng),做的這個(gè)系統(tǒng)沒有用基本的三層架構(gòu)或基本的MVC架構(gòu),而是用的一層 2.本系統(tǒng)參考了自己曾經(jīng)做過網(wǎng)站,系統(tǒng)的代碼,并不是從無到有的做出來的 3.為了在短時(shí)間實(shí)現(xiàn)了最為基本的功能,本網(wǎng)站做的比較粗糙,里面有隱患的bug,我沒有用 TRY{} catch{} finally{} 捕捉,所以在調(diào)試的時(shí)候,難免會(huì)報(bào)錯(cuò) 4.還是由于時(shí)間的倉(cāng)促,網(wǎng)站的所有網(wǎng)頁(yè),出了圖片之外,都在根目錄下,見笑了
標(biāo)簽: FRAMEWORK 1.1 NET CHINESE
上傳時(shí)間: 2016-11-01
上傳用戶:eclipse
If you are using Internet Explorer on Windows XP Service Pack 2, there is a security restriction disallowing scripts to run in files opened on your local machine. When you first TRY to run the examples, you will most likely get a message saying, "To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer." To see the example, you must click on the message and select "Allow Blocked Content". JavaScript高級(jí)程序設(shè)計(jì) 里面自代源碼
標(biāo)簽: restriction Explorer Internet security
上傳時(shí)間: 2016-11-18
上傳用戶:源弋弋
Many of the pattern fi nding algorithms such as decision tree, classifi cation rules and clustering techniques that are frequently used in data mining have been developed in machine learning research community. Frequent pattern and association rule mining is one of the few excep- tions to this tradition. The introduction of this technique boosted data mining research and its impact is tremendous. The algorithm is quite simple and easy to implement. Experimenting with Apriori-like algorithm is the fi rst thing that data miners TRY to do.
標(biāo)簽: 64257 algorithms decision pattern
上傳時(shí)間: 2014-01-12
上傳用戶:wangdean1101
This document contains official rules of the 3D soccer simulation competition at RoboCup 2006. While we will TRY to cover all cases, if unexpected events do occur, the rule committee will seek input from the participants and then make a decision. However, once the committee has made a decision, that decision is final and will not be open to further discussion
標(biāo)簽: competition simulation document contains
上傳時(shí)間: 2016-11-30
上傳用戶:zhengzg
Please read this document before attempting to compile and run the libraries and applications! The projects must be compiled in a particular order. Standard support questions are about compiler and/or linker errors that are generated when users TRY to compile the projects in the wrong order. Other information of interest is available here, so read the entire document fi rst. Wild Magic Version 2.1 is what ships with the fi rst printing of the Game Physics book. Some of the applications that are referenced in the book did not make it onto the CD–ROM for the book. Version 2.2 contains those applications, plus more
標(biāo)簽: applications attempting and libraries
上傳時(shí)間: 2014-01-16
上傳用戶:Late_Li
課本異常處理實(shí)例。各種異常處理,TRY...throw,throws。。。清華大學(xué)出版那本。
標(biāo)簽: 異常處理
上傳時(shí)間: 2014-01-07
上傳用戶:chenjjer
A "code-what"? Unless you have spent some time working in the area of reverse engineering, chances are you have not heard of the term "codecave" before. If you have heard of it, you might not have read a clear definition of it or quite understand what it is or why it is useful. I have even asked seasoned assembly programmers about the term before and most of them had not heard of it. If it is new to you, do not worry, you are not the only one. It is a term that is scarcely used and is only useful in a reverse engineering context. Furthermore, is it "codecave" or "code cave"? I am not quite sure, but I will TRY my best to refer to it consistently as a "codecave". A space may sneak in there from time to time
標(biāo)簽: engineering code-what chances reverse
上傳時(shí)間: 2014-01-17
上傳用戶:hn891122
observable distribution grid are investigated. A distribution grid is observable if the state of the grid can be fully determined. For the simulations, the modified 34-bus IEEE test feeder is used. The measurements needed for the state estimation are generated by the ladder iterative technique. Two methods for the state estimation are analyzed: Weighted Least Squares and Extended Kalman Filter. Both estimators TRY to find the most probable state based on the available measurements. The result is that the Kalman filter mostly needs less iterations and calculation time. The disadvantage of the Kalman filter is that it needs some foreknowlegde about the state.
標(biāo)簽: distribution observable grid investigated
上傳時(shí)間: 2014-12-08
上傳用戶:ls530720646
KBASIC is a BASIC like interpreter. It s implemented in C. The file includes the source code, executable and various .bas files as examples. To TRY write basic.exe and the name of one of the .bas files and KBASIC will interpret the file.
標(biāo)簽: C. interpreter implemented includes
上傳時(shí)間: 2017-03-25
上傳用戶:xzt
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1