What is the output of the following Java program?
import java.util.HashMap;
import java.util.Map;
record Seat(char row, int no) { }
public class Main {
public static void main(String[] args) {
Map<Seat, String> booked = new HashMap<>();
booked.put(new Seat('B', 4), "Asha");
booked.put(new Seat('C', 1), "Ravi");
booked.put(new Seat('B', 4), "Meena");
System.out.println(booked.size() + " " + booked.get(new Seat('B', 4)) + " " + booked.containsKey(new Seat('A', 1)));
}
}
Equal records have equal hash codes, so the second B4 replaces the first.