Another case of magical casting:
ProcessInstance pi = ksession.startProcess("com.sample.Hello", params);
String result = (String) ((WorkflowProcessInstance)process).getVariable("Object 1");
Please note that getVariable() returns an Object, so you will need to cast it to the real type.