A Solution in Java for generating the various combinations available for the given input String.