The following code has some errors, select all the correct answers from the following?
public class MyTest {
public void myTest( int i ) {
for ( int x = 0; x < i; x++ ) {
System.out.println( x ) ;
}
}
public abstract void
Test() {
myTest(10);
}
}
A) At class declaration
B) myTest() method declaration
C) Test() method declaration
D) No errors, compiles successfully
I answered a and c, but only answer c is correct. why?
i answered a, bcos, any class containing an abstract method shd be declared abstract.