Code Room
Code reviewHard
Question
Review this Java archive-extraction utility.
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
void unzip(InputStream in, File destDir) throws IOException { try (ZipInputStream zis = new ZipInputStream(in)) { ZipEntry e; while ((e = zis.getNextEntry()) != null) { File out = new File(destDir, e.getName()); out.getParentFile().mkdirs(); try (FileOutputStream fos = new FileOutputStream(out)) { byte[] buf = new byte[8192]; int n; while ((n = zis.read(buf)) != -1) fos.write(buf, 0, n); } } }}Run or narrate your approach, then ask the coach.