Added tentative java code