Implementation of Towers of Hanoi in Java