Java Tutorial/Class Definition/null
Версия от 17:44, 31 мая 2010; (обсуждение)
The null Keyword
You can test if a reference variable is null by using the == operator. For instance.
public class MainClass {
public static void main(String[] args) {
String book = null;
if (book == null) {
book = new String();
}
}
}