题目内容

以下程序的执行结果是()class StaticTest{static{System.out.print(“a “);}static{System.out.print(“b “);}public static void main(String[] args) {StaticTest st1 = new ChildTest();

A. c a b
B. a b c
C. c
D. a b

查看答案
更多问题

下面程序的运行结果()System.out.println(1+1+”1″)

A. 111
B. 编译错误
C. 21
D. 3

下面程序的运行结果为?public static void main(String[ ] args ) {int x = 30;int [ ] numbers = new int[x];x = 60;System.out.println(numbers.length ) ;}()

A. 30
B. 60
C. 20
D. 50

下列代码执行结果是()public class Rectangle {public int width = 3;public int height = 4;public int area(){return width * height;}public static void main(String args[]) {Rectangle rec

A. 15
B. 有编译错误,程序不能运行
C. 12
D. 0

在Java中,下面对于构造方法的描述正确的是()

A. 类必须显式定义构造方法
B. 构造方法的返回类型是void
C. 构造方法和类有相同的名称,并且不能带任何形参
D. 一个类可以定义多个构造方法

答案查题题库