单选题 阅读下列程序:
Class Person{
Void say () {
System.out.println("hello");
}
}
Class Example{
Public statie void main (String[] args) {
Person p2 = new Person();
Person pl = new Person();
P2.say();
Pl.say();
P2=null;
P2.say();
}
}
下列选项中描述正确的是( )。
相关试题
单选题 阅读下面的代码。
Class Test(
Public static void main(String[] args){
Inta_3;
Intb=6
System.out.println(a==b);
System out.println(a=b);
}
}
上述程序运行结束时,输出结果是( ).
单选题 假设int x=2,三元表达式x>0?x+1:5的结果为( )。
单选题 Java属于( )。
单选题 下面4种类型的文件中( )可以在Java虚拟机中运行。
单选题 下列关于this关键字的说法中,错误的是( ).
单选题 在JDK的 bin文件夹下有许多.exe可执行文件,其中java.exe命令的作用是( ).
单选题 阅读下列程序:
Class Test {
Private static String nane;
Static {
Name "World";
System,out print (name);
}
Public static void main(String[] args){
System.out.print("Hello");
Test test = new Test();
}
}
程序运行结果是( ).
单选题 下列选项中,不属于基本数据类型的是( ).