Answer:
See the explanation for the answer.
Step-by-step explanation:
As in the dynamically scoped language, using the dynamic chain, variable name must be stored in the activation records with the values. The alternative strategy is as follows:
Collection sort() can be used for this as an alternative to compare the String which is completely based on a different way by implementing interfaces for comparison and sorting being happened in different ways.