import java.util.*;

/*
 * They begin by taking turns reading from a list of starting numbers (your puzzle input).
 * Then, each turn consists of considering the most recently spoken number:
 * 
 * If that was the first time the number has been spoken, the current player says 0.
 * Otherwise, the number had been spoken before; the current player announces how many turns
 * apart the number is from when it was previously spoken.
 */

public class Memory
{
    public Memory (int number)
    {
        _theMemory = new HashMap<Long, Long>();
        _lastNumber = number;

        _theMemory.put(number, 1);
    }

    public long getLastNumber ()
    {
        return _lastNumber;
    }

    public void addNumber (long numb)
    {

    }

    public long numberPresent (long numb)
    {
        return -1;
    }

    private HashMap<Long, Long> _theMemory;
    private long _lastNumber;
}
@@ -475,18 +475,8 @@
 ry (
-int number
 )%0A  
@@ -550,53 +550,19 @@
 mber
- = number;%0A%0A        _theMemory.put(number, 1)
+Spoken = -1
 ;%0A  
@@ -660,11 +660,13 @@
 oid 
-add
+speak
 Numb
@@ -686,16 +686,216 @@
 )%0A    %7B%0A
+        _lastNumberSpoken = numb;%0A%0A        Long count = _theMemory.get(numb);%0A%0A        if (count == null)%0A            count = 0;%0A        else%0A            count++;%0A%0A        _theMemory.put(numb, count);
 %0A    %7D%0A%0A
@@ -1040,11 +1040,17 @@
 stNumber
+Spoken
 ;%0A%7D

Update Memory.java