實驗12 異常處理 12.1 實驗目的 (1)掌握異常處理的編程特點。 (2)了解Java異常分類層次,常見系統異常。 (3)了解自定義異常的定義及方法異常的拋出與處理。 12.2 知識要點 Java把異常加入Java語言的體系結構,為異常定義了類和關鍵字,簡化了錯誤處理代碼。將錯誤處理從正常的控制流中分離出來,對錯誤實施統一處理。 12.2.1異常處理結構 Try { 語句塊; } catch (異常類名1 參變量名) { 語句塊; } catch (異常類名2 參變量名) { 語句塊; } finally { 語句塊; } 說明: (1)finally總是執行,它是異常處理的統一出口,常用來實現資源釋放,文件關閉等。 (2)發生異常時Try塊內的后續語句不再執行; (3)catch按照次序進行匹配檢查處理,找到一個匹配者,不再找其它;catch的排列要按照先個別化再一般化的次序。不能將父類異常排在前、子類異常排在后。 12.2.2 常見系統異常 常見系統異常如表12-1所示。 表12-1 常見系統異常
上傳時間: 2013-12-09
上傳用戶:jhksyghr
學生公寓管理系統使用說明: 1.服務器運行環境 SQL 2000 .NET FRAMEWORK 1.1 .NET FRAMEWORK 1.1 CHINESE (SIMPLIFIED) LANGUAGE WINDOWS信使 IIS 開發環境:Windows XP Microsoft Visual Studio .NET 2003 SQL Server 2000 2.使用方法 附數據庫Manage,文件夾為DB,用戶名為sa,密碼為空。 3.通過信使將Manage文件夾添加為虛擬目錄。 起始頁是Login.aspx 網站的系統管理員帳號和密碼分別是: admin admin 網站的管理員帳號和密碼有很多,其中一個是:1 1 網站的學生帳號和密碼有很多,其中一個是: 3 12345678 制作說明: 1.由于時間倉促,為了做一個完整的系統,做的這個系統沒有用基本的三層架構或基本的MVC架構,而是用的一層 2.本系統參考了自己曾經做過網站,系統的代碼,并不是從無到有的做出來的 3.為了在短時間實現了最為基本的功能,本網站做的比較粗糙,里面有隱患的bug,我沒有用 Try{} catch{} finally{} 捕捉,所以在調試的時候,難免會報錯 4.還是由于時間的倉促,網站的所有網頁,出了圖片之外,都在根目錄下,見笑了
上傳時間: 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高級程序設計 里面自代源碼
標簽: restriction Explorer Internet security
上傳時間: 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.
標簽: 64257 algorithms decision pattern
上傳時間: 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
標簽: competition simulation document contains
上傳時間: 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
標簽: applications attempting and libraries
上傳時間: 2014-01-16
上傳用戶:Late_Li
課本異常處理實例。各種異常處理,Try...throw,throws。。。清華大學出版那本。
標簽: 異常處理
上傳時間: 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
標簽: engineering code-what chances reverse
上傳時間: 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.
標簽: distribution observable grid investigated
上傳時間: 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.
標簽: C. interpreter implemented includes
上傳時間: 2017-03-25
上傳用戶:xzt