Geeks for Geeks' code translated to other languages, starting with Java