Code created while learning java