Some more JAVA solutions