可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

class super (  public&


class super (  public int I = 0;  public super (string text) (  I = 1  )  )  public class sub extends super (  public sub (string text)   ( i= 2  )  public static void main (straing args[])   (  sub sub = new sub (“Hello”);  system.out. PrintIn(sub.i);  )    )   What is the result?() 

  • A Compilation will fail.
  • B Compilation will succeed and the program will print “0”
  • C Compilation will succeed and the program will print “1”
  • D Compilation will succeed and the program will print “2&rdquo
参考答案
参考解析:
分类:SCJP程序员认证考试题库