Short memory to self test Java Program