Driver method
public static void main ( String [ ] args ) { String arr [ ] = { " ccc " , " aaa " , " ccc " , " ddd " , " aaa " , " aaa " } ; List < String > seq = Arrays . asList ( arr ) ; System . out . println ( secMostRepeated ( new Vector < > ( seq ) ) ) ; } }