单项选择题
执行下面程序后输出的正确结果是
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)
点击查看答案&解析
相关试题
下面程序段的输出结果为 public class T...
下面程序段的输出结果是 class Base int...
下面程序段的输出结果是 public class T...