🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Test Cases and Bug Reports: all 10 questions

Quiz: Test Cases and Bug Reports · Question 7 of 10

What does this print? (code)

What does this print?

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Map<String, List<String>> next = Map.of(
            "Fixed", List.of("Retest"),
            "Retest", List.of("Verified", "Reopened"));
        System.out.println(next.get("Fixed").contains("Closed") + " " + next.get("Retest").size());
    }
}
  1. A.true 2
  2. B.false 2
  3. C.false 1
  4. D.true 1
Answer & explanation

Correct answer: false 2

Fixed can only move to Retest, and Retest has two possible next statuses.

Can you get the rest right without peeking?

Take the timed Quiz: Test Cases and Bug Reports quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →