Skip to content

Commit aca8781

Browse files
committed
fixed some mistakes
1 parent abb6455 commit aca8781

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

source/ch6_definingclasses.ptx

Lines changed: 3 additions & 3 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-
<xref ref="python-static-member-variable" text="The following Python code"/> shows how to do this in Python.
823+
<xref ref="python-static-member-variable" text="type-global"/> 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-
<xref ref="java-static-member-variable" text="The following Java code"/> shows how to do this in Java.
845+
<xref ref="java-static-member-variable" text="type-global"/> shows how to do this in Java.
846846
</p>
847847

848848
<listing xml:id="java-static-member-variable">
@@ -870,7 +870,7 @@ public class Student {
870870

871871
<p>
872872
<idx>static member variable</idx>
873-
In this example notice that we create a <term>static member variable</term> by using the <c>static</c> modifier on the variable declaration. Once a variable has been declared <c>static</c> in Java it can be accessed from inside the class without prefixing the name of the class as we had to do in Python.
873+
In <xref ref="java-static-member-variable" text="type-global"/>, notice that we create a <term>static member variable</term> by using the <c>static</c> modifier on the variable declaration. Once a variable has been declared <c>static</c> in Java it can be accessed from inside the class without prefixing the name of the class as we had to do in Python.
874874
</p>
875875
</section>
876876

0 commit comments

Comments
 (0)