单项选择题
已知有下面的类说明:
public class Test4
private float f=1.0f;
int m=12;
static int n=1;
public static void main(String args[])
Test4 e=new Test4();
在main()方法中,下面哪个的使用是正确的 ( )
A.f
B.this.n
C.Test4.m
D.Test4.f
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列程序中的循环体将会被执行 ( ) public class ex26 public static void main(String[]args) int n=4; while(n<=8) System.out.println(n); n++;
A.8次
B.2次
C.4次
D.5次
点击查看答案&解析
单项选择题
类A定义如下: class A private int x=10; int getx() return x; class B extends A private int x=15; 需要覆盖getx()方法 在下述方法中可以在类B中覆盖getx()方法的是 ( )
A.int getx()…
B.int getx(floatf)…
C.float getx()…
D.double getx(floatf)…
点击查看答案&解析
相关试题
下面是用户程序对Applet类中方法paint()...
Java的图形界面技术经历了两个发展阶段,分...
多个方法具有相同的名字而含有不同的参数时...
paint()方法带有一个参数,它是java.awt...
下列是一个Java Applet程序,填空使它的功...