this is my exercise of java