Which code fragment should you use at line n1 to instantiate the dvd object successfully?

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

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “Which code fragment should you use at line n1 to instantiate the dvd object successfully?

  1. 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);
    }

    }

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.