Changed the java code example