Skip to content

Commit a4718be

Browse files
committed
Make the student think about the length of the String that is created from the byte array to give them a clue to its contents.
1 parent 5f08f43 commit a4718be

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎koans/src/intermediate/AboutFileIO.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public void basicFileWritingAndReading() throws IOException {
4040
// No flush necessary!
4141
fr.close();
4242
assertEquals(size, __);
43-
assertEquals(new String(in), __);
43+
String expected = new String(in);
44+
assertEquals(expected.length(), __);
45+
assertEquals(expected, __);
4446
file.delete();
4547
}
4648

0 commit comments

Comments
 (0)