Driver method
public static void main ( String args [ ] ) { Integer array [ ] = new Integer [ ] { 1 , 2 , 3 , 4 , 4 , 4 , 5 , 6 } ; Point p = sequence ( new Vector < > ( Arrays . asList ( array ) ) ) ; System . out . println ( " Repeated ▁ element ▁ is ▁ " + p . x + " , ▁ it ▁ appears ▁ " + p . y + " ▁ times " ) ; } }