-
INDUCTION MOTOR CONTROL INTRODUCTION
INDUCTION MOTOR CONTROL INTRODUCTION-INDUCTION MOTOR CONTROL INTRODUCTION
- 2023-05-13 00:00:03下载
- 积分: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
-
精通QT4编程
精通QT4编程-代码(共四部分),此为第3部分-Proficient QT4 programming- the code (a total of four parts), This is Part 3
- 2023-01-30 19:00:04下载
- 积分:1
-
public class gedebahe { public static void main( String [] args) { for ( ) { int...
public class gedebahe { public static void main( String [] args) { for ( ) { int a=-1,b,c //b,c是分解出来的两个数 System.out.print("Please input a oushu:") //输入一个偶数 try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) String inputLine = in.readLine() a = Integer.valueOf(inputLine).intValue() }catch (Exception exc) { System.out.println("Sorry,please input a number.") return } if (a%2!=0) { System.out.println("Sorry,please input a oushu.") return } for (b=1 b
- 2022-09-15 17:45:03下载
- 积分:1
-
openssl生成证书,数字签名,加密解码
资源描述
利用openssl 生成根证书,证书发布,数字签名。
握手建立会话长连接,发送,接收数据,最后销毁会话。
- 2022-01-22 10:52:17下载
- 积分:1
-
批量转换字符集用,用了firefox侦测字符集的库
批量转换字符集用,用了firefox侦测字符集的库-Batch conversion character set used by the firefox library character set detection
- 2023-02-15 15:40:03下载
- 积分:1
-
explains the technique of finding permutations and provides source code for the...
explains the technique of finding permutations and provides source code for the recursive implementation
- 2022-01-25 23:12:27下载
- 积分:1
-
RS232串口蓝牙WINCE 驱动源代码
RS232串口蓝牙WINCE 驱动源代码-RS232 serial port Bluetooth driver source code WINCE
- 2022-02-25 10:30:26下载
- 积分:1
-
Power PC 55xx 时钟初始化程序
Power PC 55xx 时钟初始化程序-Power PC 55xx clock initialization procedure
- 2022-03-30 11:06:34下载
- 积分:1
-
This is an algorithm to achieve the lift, two elevators, six floors to VC 6.0
这是一个电梯算法的实现,有两部电梯,六层楼,以VC++6.0实现-This is an algorithm to achieve the lift, two elevators, six floors to VC 6.0
- 2022-06-27 22:44:50下载
- 积分:1