In StudioPro go to the Java action and on the bottom of java-action settings, there is the return-type parameter.
You currently have set this to String, which is why you have java.lang.String on line 23. You can change the return-type parameter to an Object, List or any of the other drop-down options. Then Run your app again. This will make the Java code get modified and a return variable will appear.
Now you can add your own code between
// BEGIN USER CODE return "Some text"; // END USER CODE
and you have to make sure that your java-code returns the type that you have set the return-type to.
For more info check https://docs.mendix.com/refguide/java-actions/
For examples look at other java-actions for instance the ones in marketplace module Community Commons