Most Difficult Java Program