A. Static class FooBar{} B. Private class FooBar{} C. Abstract public class FooBar{} D. Final public class FooBar{} E. Final abstract class FooBar{}
1. class super { 2. public float getNum() {return 3.0f;} 3. } 4. 5. public class Sub extends Super { 6. 7. } Which method, placed at line 6, will cause a compiler error?()
A. Public float getNum() {return 4.0f; } B. Public void getNum () { } C. Public void getNum (double d) { } D. Public double getNum (float d) {retrun 4.0f; }
public class test( public int aMethod()[ static int i=0; i++; return I; ) public static void main (String args[]){ test test = new test(); test.aMethod(); int j = test.aMethod(); System.out.printIn(j); ] } 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”