Driver code
public static void main ( String [ ] args ) { String [ ] arr = { " ab " , " aab " , " abaaaa " , " bbd " } ; String S = " ab " ; System . out . print ( countStrings ( S , arr ) + "NEW_LINE"); } }