Driver code
public static void main ( String [ ] args ) { List < String > strings = Arrays . asList ( " hi " , " data " , " geeksforgeeks " ) ; String chars = " tiadhae " ; System . out . println ( countCharacters ( strings , chars ) ) ; } }