Can you change the code to java?