Java Reference
In-Depth Information
Figure 6-13.
Notice that the object holding the original value of “1” is still in memory and that there are actually three objects.
If we then set A equal to B and assigned B a new value of “50”, memory would look like Figure 6-14 .
Figure 6-14.
Yikes! Once again, this topic may seem unnecessarily complicated. However, the purpose is to show that String
objects are more complicated than they appear and that you should be careful when comparing and changing their
values. When using strings you should strive for simplicity and try to avoid complicated value assignments.
Checkboxes
A checkbox appears as a small square text field, with a label to the right. A checkbox is like a toggle switch: it has
two states. A toggle switch can be on or off, and a checkbox can be checked or unchecked. Clicking on a checkbox
will change the state from unchecked to checked or from checked to unchecked. When in the checked state, the
checkbox's small text field will contain a checkmark and when in the unchecked state, the text field is empty.
 
Search WWH ::




Custom Search