Multiple Choice Question

Quiz Guidelines

 

QID: 
499
Question: 

Given the following code, which of these constructors can be added to class B without causing a compile time error?

class A{
int i;
public A(int x) { this.i = x; }
}class B extends A{
int j;
public B(int x, int y) { super(x); this.j = y; }
}

Select 2 options

A. B( ) { }
B. B(int y ) { j = y; }
C. B(int y ) { super(y*2 ); j = y; }
D. B(int y ) { i = y; j = y*2; }
E. B(int z ) { this(z, z); }

Q&A Set: