classic java code