版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/x18094/article/details/89280856
清明回家碰到表弟,表弟说羡慕我是程序员,不用风吹日晒。我说天天改BUG,头发都掉光了,我羡慕你才是,没有腰病、脖子病。
表弟问:“什么是BUG?”。
我:“emmmm...”
我竟无言以对,于是我恍惚间,点燃了一支香烟,不料烟雾缭绕,以致迷失了方向,我仿佛身处电闪雷鸣下,我看到了观音菩萨,菩萨说:“你是猪吗?我虽然是救苦救难的菩萨,但是你这么点问题也要来求我,你这是浪费公共资源,让我来告诉你吧!”
emmmm编不下去了.... 直接说主题吧...
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);
}
已经没了吧? 嗯?@_@