单项选择题

下面程序段的输出结果为( )。
package test;
public class ClassA int x=20;
static int y=6;
public static void main(String args[])

ClassB b=new ClassB();
b. go(10);
System. out.println("x="+b. x);
class ClassB int x;
void go(int y)

ClassA a=new ClassA();
x=a. y;

A.x=10
B.x=20
C.x=6
D.编译不通过
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果为( )。public class Test int a, b; Test() a=100; b=200; Test(int x, int y) a=x; b=y; public static void main(String args[]) Test Obj 1 = new Test(12,45 ); System.out.println( a= +Obj1.a+ b= +Obj1. b); Test Obj2 = new Test(); System.out.println( a= +Obj2.a+ b= +Obj2. b);
A.a=100 b=200
a=12 b=45
B.a=12 b=45
a=100 b=200
C.a=12 b=200
a=100 b=45
D.a=100 b=45
a=12 b=200
单项选择题
数据结构中,与所使用的计算机无关的是数据的( )。
A.存储结构
B.物理结构
C.逻辑结构
D.物理和存储结构
相关试题
  • 在HTML页中可包含Applet,关于Applet 的参...
  • 要把高级语言编写的源程序转换为目标程序,...
  • 以下( )不是Java 中有效的关键字。
  • 在下列几种排序方法中,要求内存量最大的是...
  • 下列命令中,属于Java 编译命令的是( )...