ReturnAsJavaObject[expr] causes a Java method call or field access during the evaluation of expr to return its result as an object reference (a JavaObject expression), not a value.
Most Java objects are returned as references normally, but those that have a meaningful Mathematica representation are returned "by value". Such objects include strings, arrays, and the so-called wrapper classes like java.lang.Integer. ReturnAsJavaObject overrides the normal behavior and forces any object returned to Mathematica to be sent only as a reference.
Typically used to avoid needlessly sending large arrays of numbers back and forth between Java and Mathematica.