我是靠谱客的博主 雪白皮带,最近开发中收集的这篇文章主要介绍最近遇到的异常与错误总结,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

异常
NumberFormatException  数字格式化异常
ArithmeticException 算术异常
ArrayIndexOutOfBoundsException  数组超出绑定异常:没有输入参数,或输入的参数不够
NullPointerException 空指针异常:使用了未实例化的对象
NoSuchMethodError:main  找不到主方法
ClassCastExeption:A 类转换异常
IllegalThreadStateException:非法的线程状态异常
IOException: IO流异常


错误
integer number too large
name has private access in Person 无法访问封装属性
call to this must be first statement in constructor  错误的调用,只能放在构造方法的首行
recursive constructor invocation 递归调用了构造方法
non-static variable name cannot be referenced from a static context  不能调用非static属性
non-static method fun() cannot be referenced from a static context 不能调用非static方法
Singleton() has private access in Singleton 无法实例化
print() in Student cannot override print() int Person; attempting to assign weaker access privileges; was public 覆写父类中的方法,便缩小了权限,错误
cannot inherit from final A
print() in B cannot override print() in A; overridden method is final
cannot assign a value to final variable INFO
OutOfMemoryError:

转载于:https://www.cnblogs.com/huguangqin/p/7124020.html

最后

以上就是雪白皮带为你收集整理的最近遇到的异常与错误总结的全部内容,希望文章能够帮你解决最近遇到的异常与错误总结所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(43)

评论列表共有 0 条评论

立即
投稿
返回
顶部