An integer stack in Java