1 ClassCastException
运行时,如果发现对象的真实类型与强转后的类型不同,就会报类型转换异常(ClassCastException)的错误出来。
2 NullPointerException
空指针异常
3 NoSuchElementException
![image.png](https://img-blog.csdnimg.cn/img_convert/c6182cb26f093e410c9057be267c11f9.png)
4 ConcurrentModificationException 并发修改异常
![image.png](https://img-blog.csdnimg.cn/img_convert/253abcc134a8ffe3bc4b0037ccae51eb.png)
5 IllegalStateException 非法状态
如:Stream流 stream has already been operated upon or closed(流只能收集一次)