Swapping instance field values of two objects

While working on Codecademy’s Java tutorial’s BUILD A DROID PROJECT I saw
"Create a method energyTransfer() that exchanges batteryLevel between instances."
How can I write the code for swapping values of two different objects?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.