Adding example usages of sequence in Java version