Skip to content

Commit abb6455

Browse files
committed
added listing in tags
1 parent 5e7bd1c commit abb6455

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/ch6_definingclasses.ptx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ public int compareTo(Fraction other) {
820820
Suppose that you wanted to write a Student class so that the class could keep track of the number of students it had created.
821821
Although you could do this with a global counter variable that is an ugly solution.
822822
The right way to do it is to use a <c>static</c> variable.
823-
In Python, we could do this as follows:
823+
<xref ref="python-static-member-variable" text="The following Python code"/> shows how to do this in Python.
824824
</p>
825825

826826
<listing xml:id="python-static-member-variable">
@@ -842,7 +842,7 @@ main()
842842
</listing>
843843

844844
<p>
845-
In Java, we would write this same example using a <c>static</c> declaration.
845+
<xref ref="java-static-member-variable" text="The following Java code"/> shows how to do this in Java.
846846
</p>
847847

848848
<listing xml:id="java-static-member-variable">

0 commit comments

Comments
 (0)