Java program that solves tower of hanoi problem using recursion