Question d’entretien chez Infosys

Why string is immutable? Java program to sort map by value