Java program to find the lexicographically maximum substring .
import java . io . * ; import java . util . * ; class GFG { static String LexicographicalMaxString ( String str ) { char maxchar = ' a ' ; ArrayList < Integer > index = new ArrayList < Integer > ( ) ;