Km0 in Java