Driver code
class AppDriver { public static void main ( String args [ ] ) { int [ ] arr = { 0 , 1 , 2 } ; AllPermutation perm = new AllPermutation ( arr ) ; perm . GetFirst ( ) ; while ( perm . HasNext ( ) ) { perm . GetNext ( ) ; } } }