阅读程序,下面的哪个选项是正确的?()。class ExSuper{String name;String nick_name;public ExSuper(String s,String t) {name = s;nick_name = t;}public String toString(){return name;}}public class Example extends ExSuper{public Example(String s,String t){super(s,t);}public String toString(){return name +"a.k.a"+nick_name;}public static void main(String args[]){ExSuper a = new ExSuper(“First”,“1st”);ExSuper b = new Example(“Second”,“2nd”);System.out.println(“a is”+a.toString());System.out.println("b is"+b.toString());}}
A. 编译时会出现例外
B. 运行结果为:a is Firstb is second
C. 运行结果为:a is Firstb is Second a.k.a 2nd
D. 运行结果为:a is First a.k.a 1stb is Second a.k.a 2nd