How to discard and swap items in java?

Printable View