Skip to content

Commit 6d385b4

Browse files
committed
fixed program tags
1 parent bf5eed8 commit 6d385b4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

source/ch8_filehandling.ptx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</code>
3737
</program>
3838
</listing>
39-
39+
4040
<p>
4141
Note the use of <c>import java.lang.Math;</c> in the above to import the <c>Math</c> class. Unlike Python, Java requires explicit <c>import</c> for most libraries, including the <c>Math</c> class and many classes related to file handling.
4242
</p>
@@ -46,7 +46,7 @@
4646
</p>
4747

4848
<listing xml:id = "io-file-import">
49-
<program language="java">
49+
<program>
5050
import java.io.File;
5151
</program>
5252
</listing>
@@ -55,7 +55,7 @@
5555
The <c>Scanner</c> class from the <c>util</c> library will need to be imported if there is any need for a program to read a file. It should be noted that this library is unnecessary if the program will not be reading any data from a file.
5656
</p>
5757
<listing xml:id = "util-scanner-import">
58-
<program language="java">
58+
<program>
5959
import java.util.Scanner;
6060
</program>
6161
</listing>
@@ -65,7 +65,7 @@
6565
</p>
6666

6767
<listing xml:id = "io-filewriter-import">
68-
<program language="java">
68+
<program>
6969
import java.io.FileWriter;
7070
</program>
7171
</listing>
@@ -75,7 +75,7 @@
7575
</p>
7676

7777
<listing xml:id = "io-exception-imports">
78-
<program language="java">
78+
<program>
7979
import java.io.IOException;
8080
import java.io.FileNotFoundException;
8181
</program>

0 commit comments

Comments
 (0)