Adding example to java 5 in README