this seems like a very basic question, so I suggest you take a look at the Camunda Getting Started Tutorials.
But in general when you are working with JavaDelegates you can do the following:
Set an object as process variable:
execution.setVariable(“variableName”, variable);
Get a process variable:
execution.getVariable(“variableName”);
Hope this helps
Regards
Michael