How to pass output from one service task to other service task

I am new to Camunda BPMN tool. I am trying to pass some output values from one service task to other service task. Here i can able to call java class from service task and able to run the program but the program output is displayed on command prompt. I need to pass the output values to other service task to continue the flow. If there is any suggestions means please let me know

You can store any relevant output in process variables.
These process variables are accesible in the upcoming service tasks.
Have a look at the documentation https://docs.camunda.org/manual/7.9/user-guide/process-engine/variables/
or the camunda examples https://github.com/camunda/camunda-bpm-examples

thank you @tim_kraeuter