GitHub Java Solution