java code seems to compile