Revert "Create swapNodes.java"

This reverts commit 06c62b98614d3f688e87c08f7d947c106d21b140.
Revert "Revert "Create swapNodes.java""

This reverts commit 8d6bde7dea2459fd4b7efa094248fa9425219d6b.