Code form JAVA programming class