Driver code
public static void main ( String [ ] args ) { CocktailSort ob = new CocktailSort ( ) ; int a [ ] = { 5 , 1 , 4 , 2 , 8 , 0 , 2 } ; ob . cocktailSort ( a ) ; System . out . println ( " Sorted ▁ array " ) ; ob . printArray ( a ) ; } }