單項(xiàng)選擇題

1.class TestSuper { 22.TestSuper(int i) { } 3. } 4.class TestSub extends TestSuper{ } 5.class TestAll { 6.public static void main (String [] args) { 7.new TestSub(); 8.} 9.} Which is true?()  

A. Compilation fails.
B. The code runs without exception.
C. An exception is thrown at line 7.
D. An exception is thrown at line 2.

微信掃碼免費(fèi)搜題