1.这个就太主动了吧
throw new RuntimeException("我是小可爱呀!我骚不骚@_@");
2.没有空指针怎么行
Integer a = null;
int b = a;
再来个这个:
String a = null;
String b = a.substring(0);
3.越界
int[] arr = {};
int a =arr[0];
4.搞个内存溢出 OutOfMemoryError
List<Integer> list = new ArrayList<>();
while(true){
list.add(1);
}
已经没了吧? 嗯?@_@