Driver Code
public static void main ( String [ ] args ) { String s = " codecppforfood " ; char begin = ' c ' ; char end = ' d ' ; System . out . println ( numberOfDifferentSubstrings ( s , begin , end ) ) ; } }