Skip to content

Commit aa7b287

Browse files
committed
fixed a block in the later sections
1 parent 25ef435 commit aa7b287

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

source/ch3_javadatatypes.ptx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ public class TempConv {
250250
For Python programmers, the following error is likely to be even more common. Suppose we forgot the declaration for <c>cel</c> and instead left line 6 blank. What would happen when we type <c>javac TempConv.java</c> on the command line?
251251
</p>
252252

253-
<pre>
253+
<listing xml:id="java-temperature-conversion-error">
254+
<program>
255+
<code>
254256
TempConv.java:13: cannot find symbol
255257
symbol : variable cel
256258
location: class TempConv
@@ -262,10 +264,12 @@ public class TempConv {
262264
System.out.println("The temperature in C is: " + cel);
263265
^
264266
2 errors
265-
</pre>
267+
</code>
268+
</program>
269+
</listing>
266270

267271
<p>
268-
When you see the first kind of error, where the symbol is on the left side of the equals sign, it usually means that you have not declared the variable. If you have ever tried to use a Python variable that you have not initialized the second error message will be familiar to you. The difference here is that we see the message before we ever try to test our program. More common error messages are discussed in the section <xref ref="common-mistakes-id1"/>.
272+
When you see the first kind of error in <xref ref="java-temperature-conversion-error" text="type-global"/> , where the symbol is on the left side of the equals sign, it usually means that you have not declared the variable. If you have ever tried to use a Python variable that you have not initialized the second error message will be familiar to you. The difference here is that we see the message before we ever try to test our program. More common error messages are discussed in the section <xref ref="common-mistakes-id1"/>.
269273
</p>
270274

271275
<p>

0 commit comments

Comments
 (0)