Question 121

Given the following segment of code :

Which two statements, if either were true, would make the code compile? (Choose two.)
  • Question 122

    Given the definitions of the Birdclass and the Peacock class:

    and the code fragment:

    Which code snippet can be inserted to print Fly.Dance. ?
    Bird p = new Peacock();
  • Question 123

    Given the definitions of the Bird class and the Peacock class:

    and the code fragment:

    Which code snippet can be inserted to print Fly.Dance. ?
  • Question 124

    Given the code fragment:

    What is the result?
  • Question 125

    Given the code fragment:

    Which code fragment, when inserted at line 3, enables the code to print 10:20?