Skip to content

Commit a23e698

Browse files
committed
correct introduced errors
1 parent 189ef9b commit a23e698

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/ch_7_definingclasses.ptx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@
160160
</program>
161161

162162
<p>
163-
<idx>get</idx>
164-
<idx>set</idx>
165-
Direct access to instance variables is not allowed.
166-
Therefore if we legitimately want to be able to access information such as the numerator or denominator for a particular fraction we must have getter methods.
167-
It is very common programming practice to provide <term>get</term> and <term>set</term> methods for instance variables in Java.
163+
<idx>getter method</idx>
164+
<idx>setter method</idx>
165+
Direct access to instance variables is not allowed in Java.
166+
Therefore if we legitimately want to be able to access information such as the numerator or the denominator for a particular fraction we must have a <term>getter method</term> that returns the needed value.
167+
Hence, it is a very common programming practice to both provide <term>getter methods</term> and <term>setter methods</term> when needed for instance variables in Java.
168168
</p>
169169

170170

0 commit comments

Comments
 (0)