Given:
Which code fragment should you use at line n1 to instantiate the dvd object successfully?
A. Option A
B. Option B
C. Option C
D. Option D
Given:
Which code fragment should you use at line n1 to instantiate the dvd object successfully?
A. Option A
B. Option B
C. Option C
D. Option D
C
public class Q138{
int r;
Q138(int r){
this.r=r;
}
}
class DVD extends Q138{
int c;
DVD(int r, int c){
super(r);
this.c=c;
}
public static void main(String[] args) {
DVD dvd = new DVD(10,20);
System.out.println(dvd.r+”:”+dvd.c);
}
}