Code Room
Code reviewMedium
Question
Review this Java resource handler.
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
public String readFirstLine(String path) { BufferedReader r = null; try { r = new BufferedReader(new FileReader(path)); return r.readLine(); } catch (IOException e) { log.warn("read failed"); return null; } finally { try { if (r != null) r.close(); } catch (IOException e) { return ""; } }}Run or narrate your approach, then ask the coach.