The java code