Java program to swap two string without using temp

Example:

Output :

Smallest word: an
Largest word: extraordinary