Daily practice java code