Left shift
String s1 = strEle . substring ( idx , yy ) ; String s2 = strEle . substring ( 0 , idx ) ; String s = s1 + s2 ; int ls = Integer . valueOf ( s ) ; if ( ls >= prev && flag ) { optEle = ls ; flag = false ; }