Implementation of Matchstick Clock in Java