Review of my java code