understanding java code