To store subStrings
String answer = " " , curr = " " ; long maxProduct = 0 , product = 1 ; for ( int i = 0 ; i < n ; i ++ ) { product *= 1L * value ( str . charAt ( i ) ) ; curr += str . charAt ( i ) ;