找考题网-背景图
单项选择题

classsuper(publicintI=0;publicsuper(stringtext)(I=1))pu……

classsuper(publicintI=0;publicsuper(stringtext)(I=1))publicclasssubextendssuper(publicsub(stringtext)(i=2)publicstaticvoidmain(straingargs)(subsub=newsub(Hello”);system.out.PrintIn(sub.i);))Whatistheresult?()
A.Compilationwillfail.
B.Compilationwillsucceedandtheprogramwillprint“0”
C.Compilationwillsucceedandtheprogramwillprint“1”
D.Compilationwillsucceedandtheprogramwillprint“2”

A.out.PrintIn(sub.i);))Whatistheresult?()
A.Compilationwillfail.
B.Compilationwillsucceedandtheprogramwillprint“0”
C.Compilationwillsucceedandtheprogramwillprint“1”
D.Compilationwillsucceedandtheprogramwillprint“2”
热门试题