diff --git a/source/ch8_filehandling.ptx b/source/ch8_filehandling.ptx
index ba5d0cf..b0e0a49 100644
--- a/source/ch8_filehandling.ptx
+++ b/source/ch8_filehandling.ptx
@@ -163,9 +163,11 @@ public class CreateFile {
Let’s take a look at how we can use Python to understand how read file contents in Java. In order to read files generally you iterate through each line in the file and read the line's content. In Java, you read files in a very similar way, however in Java we will use the
- Consider the following Python code example that reads each line of the file and prints it to the console.
+ Consider
1
2
@@ -177,8 +179,9 @@ public class CreateFile {
8
filename = "myfile.txt"
try:
@@ -192,12 +195,14 @@ public class CreateFile {
print("file could not be opened")
- The following Java code functions very similarly to the previous Python. The main difference here is that unlike Python, in Java we use the
import java.io.File;
import java.io.FileNotFoundException;
@@ -218,6 +223,7 @@ public class CreateFile {
}
You may have noticed that there are some new methods you haven't seen yet. The