Code Room
Code reviewHard
Question
Review this Java method that attaches each order's customer name by matching against a list of customers.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
List<View> join(List<Order> orders, List<Customer> customers) { List<View> views = new ArrayList<>(); for (Order o : orders) { for (Customer c : customers) { if (c.id() == o.customerId()) { views.add(new View(o, c.name())); break; } } } return views;}Run or narrate your approach, then ask the coach.