java codes made for fun :)