User Tools

Site Tools


java:access_specifiers_accessors_and_mutators

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
java:access_specifiers_accessors_and_mutators [2020/09/12 01:54] – [this] mithatjava:access_specifiers_accessors_and_mutators [2020/09/12 01:57] – old revision restored (2020/09/12 01:55) mithat
Line 235: Line 235:
 ===== this ===== ===== this =====
  
-Every class has an automatically generated private ''this'' member variable that points to the object it's associated with. In other words, it's a reference back to the object itself.+Every class has an automatically generated ''this'' member variable that points to the object it's associated with. In other words, it's a reference back to the object itself.
  
 ''this'' can be used to simplify writing mutators and other methods that have parameters because it eliminates the need to come up with new names for parameters. Let's see how this works by modifying the ''setMaxCount()'' method. ''this'' can be used to simplify writing mutators and other methods that have parameters because it eliminates the need to come up with new names for parameters. Let's see how this works by modifying the ''setMaxCount()'' method.
java/access_specifiers_accessors_and_mutators.txt · Last modified: 2020/09/12 02:01 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki