History variables: Difference between revisions
m
→{{header|Java}}: fix several markup problems
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) m (→{{header|Java}}: fix several markup problems) |
||
Line 1,093:
Java does not support history variables, but they are easy to implement using the lists that come with Java's Collections framework.
===
This implementation does not allow the History Variable to be "empty". It can be assigned one or multiple "nulls", but it can never have an undefined value (such as being created and not initialized).
<syntaxhighlight lang="java">import java.util.Collections;
Line 1,210:
</pre>
===
This implementation does not allow the History Variable to be "empty". It can be assigned one or multiple "nulls", but it can never have an undefined value (such as being created and not initialized).
Test Program using a "String with History":
<syntaxhighlight lang="java">import java.util.Collections;
|