program to swap two strings without using third variable in java

Here we will see a program to swap two strings without using third variable in java.

 

Output is –

Before swapping of string : my name
After swapping of string : name my

Top