Changed CPPtoJavaCompare, runs faster

and stil functions the same