单项选择题

执行下面程序后输出的正确结果是
Public class Test
public static void main(String args[])
byte x=3,y=4;
long r=80L;
System.out.print(r/y);
System.out.print(”,”);
System.out.print(x/y);

A.20.0,1
B.20.0,1.0
C.20,0
D.20,1.0
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果为 package test; public class A int x=20; static int y=6; public static void main(String args[]) Class B b=new Class B(); b.go(10); System.out.println(”x=”+b.x); class Class B int x; void go(int y) ClassA a=new ClassA(); x=a.y;
A.x=10
B.x=20
C.x=6
D.编译不通过
单项选择题
有一个接口定义如下,下列选项中实现了该接口并且不是抽象的是 interface A int method1(int i); int method2(int j);
A.class B implements A
    
     int method 1()
     int method 2()

B.class B
    
     int method 1(inti)
     int method 2(intj)

C.class B implements A
    
     int method 1(inti)
     int method 2(intj)

D.class B extends A
    
     int method 2(intj)
     int method 1(intj)

相关试题
  • 要使处于不同层次,甚至是互不相关的类可以...
  • Java运行时系统通过 【9】 周期性地释放...
  • 下面的程序是列出目录C:\Test中所有的.t...
  • 下面程序段是创建一个Date类的对象并把它串...
  • Java语言的循环语句包括for语句、do-while...