Jump to content

History variables: Difference between revisions

m
(Added Java, both an integer-only and a Generic version)
Line 867:
==={{header|Java Integer with History}}===
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).
<lang javaJava>import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
Line 942:
</lang>
Test Program:
<lang javaJava>public class TestIntegerWithHistory {
 
public static void main(String[] args) {
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.