[单选题]

已知有下面的类说明: 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.e.f

B.this.n

C.Test4.m

D.Test4.f

参考答案与解析:

相关试题

阅读下面程序 public class Test4 {public static

[单选题]阅读下面程序 public class Test4 { public static Void main(String args[]){ int i=10, j=3; float m=213.5f, n=4.0f; System.out.println(i%j); System.out.println(m%n); } } 程序运行的结果是A.1.0和1.5B.1和1.5C.1.0和2.5D.1和2.5

  • 查看答案
  • 阅读下面程序public class Test4 { public static

    [单选题]阅读下面程序 public class Test4 { public static void main(String[] args) { int 1=10,j=3; float m=213.5f,n=4.0f; System.out.println(i%j); System.out.println(m%n); } } 程序运行的结果是A.1.0和1.5B.1和1.5C.1.0和2.5D.1和2.5

  • 查看答案
  • 阅读下面程序 public class Test4 {public static

    [单选题]阅读下面程序 public class Test4 { public static Void main(String args[]){ int i=10, j=3; float m=213.5f, n=4.0f; System.out.println(i%j); System.out.println(m%n); } } 程序运行的结果是A.1.0和1.5B.1和1.5C.1.0和2.5D.1和2.5

  • 查看答案
  • 阅读下面程序public class Test4{public static v

    [单选题]阅读下面程序public class Test4{public static void main(String args[]){int i=10,j=3;float m=213.5f,n=4.0f;System.out.printin(i%j);S ystem.out.println(m%n);}}程序运行的结果是A.)1.0 和 1.5B.)1 和 1.5C.)1.0 和 2.5D.)1 和 2.5

  • 查看答案
  • 下列代码的执行结果是( )。 public class test4{ publi

    [单选题]下列代码的执行结果是( )。 public class test4{ public smile void main(string args[]){ int a=4,b=6,c=8; String s="abc"; Sy stem.out.println(a+b+s+e); System.out.pfinfin(); } }A.ababccB.464688C.46abc8D.10abc8

  • 查看答案
  • 已知有下列类的说明,则下列哪个语句是正确的?public class Test

    [单选题]已知有下列类的说明,则下列哪个语句是正确的?public class Test { private float f=1.0f; int m=12; static int n=1; public static void main(String arg[]) { Test t= new Test(); }}A.t.f;B.this. nC.Test.m;D.Test.f;

  • 查看答案
  • 运行下面的程序时,会产生()。 public class Test{public

    [单选题]运行下面的程序时,会产生( )。 public class Test{ public static void main(String args[ ] ) { int x =0; int y = 2/x; int z[ ] = {1,2,4,6}; int p=z[4]; } }A.ArrayIndexOutOfBoundsExcePtion异常B.NumberFormatException异常C.ArithmeticException异常D.ArithmeticException异常和Array

  • 查看答案
  • 有如下类说明:class TestClass{int x;public:Test

    [单选题]有如下类说明: class TestClass{ int x; public: TestClass(int n){x=n;} }; class TestClass1:public TestClass{ int y; public: TestClass1(int a,int b); }; 在构造函数TestClass1的下列定义中,正确的是( )。A.TestClass1::TestClass1 (int a,int b):x(a),y(b){}B.TestClass1::TestClass1 (

  • 查看答案
  • 运行下面的程序时,会产生( )。 public class Test{publi

    [单选题]运行下面的程序时,会产生( )。 public class Test{ public static void main(String args[ ] ) { int x =0; int y = 2/x; int z[ ] = {1,2,4,6}; int p=z[4]; } }A.ArrayIndexOutOfBoundsExcePtion异常B.NumberFormatException异常C.ArithmeticException异常D.ArithmeticException异常和Array

  • 查看答案
  • 阅读下面代码public class Test { public static

    [单选题]阅读下面代码 public class Test { public static void main(String avgs[]) { System.out.println(89>>1); } } 其运行结果是A.44B.45C.88D.90

  • 查看答案
  • 已知有下面的类说明:public class Test4{private flo