java.lang.NullpointException is a runtime exception. you do not need to catch it explicitly. Because in Java, any object reference could be a null reference. For example: when you use a object reference as a parameter of a method. you may be input a null value into method. so the JVM will throw the NullpointException at the runtime.
解决方案 »
- 文件读取错误。请各位帮忙看一下啊
- java 散列码问题
- 有兴趣的进来,看一看
- 如何安装Sun one Studio community Edition 4 for windows
- 关于<java rules>中的一处不明白
- 如何在大文件中搜索特定的字符串
- 大神求救。为什么把一堆程序封装成方法之后出现编译出现需要.class
- setlookandfeel是什么?
- 各位大侠请问哪儿有介绍JBULIDER的书
- 一个关于Java包的问题,急,急
- 在java里面如何交换两个变量的值(注意:是在一个函数里面)?如经典的swap(String a,String b)
- 谁能给我一个响应失去焦点事件的例子啊?是在搞不定了。
一般出错误是这样的class Sample{
JLable jLable;// here is wrong JLable jLable = new jLable() is right
public Sample(){
hehe
}
public void myMethod(){
jLable.setText( "you wrong" );
}
}
3x!