-
applet的各种基本功能的实现
applet的各种基本功能的实现-applet in the realization of basic functions
- 2022-07-02 23:38:32下载
- 积分:1
-
java异常处理
3.8 异常处理
什么是异常
知道Java异常分类
处理异常的两种方式
throw和throws区别
如何创建自定义异常
概念:
在程序中,可能产生程序员没有预料到的各种错误情况,比如打开一个不存在的文件等,在Java中,这种在程序运行时可能出现的错误称为异常。
异常可以把“描述在正常执行过程中做什么事”的代码和“出了问题怎么办”的代码相分离
例子:demo05.ExceptionDemo.java
Java异常分类A:
java.lang.Error,java.lang.Exception
Error(错误):jvm系统内部错误、资源耗尽等严重问题,发生Error时,编程人员无能 为力,只能终止程序,例如内存溢出等。
Exception(异常):因编程错误或偶然的外在因素导致的一般性问题,例如:对负数 开平方根、空指针访问等,当发生Exception 时,编程人员可以做出处理,并做出人性 化响应,比如弹出窗口,显示“请不要输入负数!”。
异常分类B:
检查性异常:编译器必须处理的异常,该类异常通常是Exception类型或其子类(RuntimeException类除外)//运行时异常
SQLException、IOException、ClassNotFoundException
例子:/DemoProject/src/com/hyg/demo08/FileInputStreamDemo.java
非检查性异常:编译器不要求强制处理的异常,RuntimeException类及其所有子类都是非检查性异常。
NullPointerException、ClassCastException
例子:equa
- 2022-02-14 14:02:16下载
- 积分:1
-
采用MFC编写的一个很简单的地图编辑器,详细见源代码
采用MFC编写的一个很简单的地图编辑器,详细见源代码-MFC prepared to adopt a very simple map editor, in detail see the source code
- 2022-03-23 02:17:59下载
- 积分:1
-
Calculator the screen.
计算屏幕的一点分布的, 可以看出屏幕的尺寸。-Calculator the screen.
- 2022-03-21 14:06:52下载
- 积分:1
-
非常经典的C++编程,涵盖其所有内容,详细的结果。
非常经典的windows c++编程,涵盖其全部内容,例子详尽,是程序员不可多得的手头资料,已经编译成帮助文档,搜索非常方便-Very classic windows c++ Programming, covering all of its contents, a detailed example is the rare programmer-hand information has been compiled into a help file, search is very convenient
- 2022-01-26 07:31:49下载
- 积分:1
-
侯俊杰深入浅出MFC配套光盘.rar
侯俊杰深入浅出MFC配套光盘.rar-cd of Dissecting MFC by Hou Jie
- 2023-06-18 17:40:06下载
- 积分:1
-
x 4,558,302 choice of a complete coding procedures compression rate and display...
x选用lzw编码的一个完整程序 有压缩率和字典显示 功能全-x 4,558,302 choice of a complete coding procedures compression rate and display the entire dictionary
- 2023-09-03 15:30:02下载
- 积分:1
-
this is a hotel management system
this a hotel management system-this is a hotel management system
- 2022-05-05 03:28:38下载
- 积分:1
-
kjsdhfohsadkflhsladfhkilsadflhsadofhfhodsahf
实现对内存单元的内容中特定需要符号的统计。-kjsdhfohsadkflhsladfhkilsadflhsadofhfhodsahf
- 2023-05-14 14:45:03下载
- 积分:1
-
can be used for the specified procedures in the state are monitored, or if the d...
可用于对指定的程序运行状态进行监控,如果退出运行或者已经没有响应(既死掉),则杀掉无响应的进程,并重新自动运行前保留现场屏幕到文件。-can be used for the specified procedures in the state are monitored, or if the decommissioning has not responded (both dead), then kill the process without a response, and automatic re-run the scene before the reservation screen of the document.
- 2022-02-25 03:08:54下载
- 积分:1