题目内容

{下面程序编译运行的结果是( )class Demo {void setData(T a){System.out.print(a);};}public class Demo2015 {public static void main(String[]a){Demo d = new Demo();d.setData("a");d.setData(1);}}}

A. a
B. 1
C. a1
D. 编译错误

查看答案
更多问题

若有定义class Father{},下面继承方式错误的是( )

A. class Son extends Father
B. class Son extends Father
C. class Son extends Father
D. class Son extends Father

{在【1】~【4】处填写适当代码,使程序完整。class ____【1】{____【2】;int number;public void setData(int number,T a){this.number = number;this.a = a;}public int getNumber(){return number;}public ____【3】{return a;}}public class Demo{public static void main(String[] args) {Data data = ____【4】;data.setData(1, 90);System.out.println(data.getNumber()+":"+data.getA());}}}

We dashed to the bus station and barely got on the bus when it __________.

Somewhat ____ my ______ , the police has finally decided to eliminate my brother from their list of suspects.

答案查题题库