Increase the index
i ++ ; } System . out . println ( " Below are counts " ▁ + ▁ " of all elements "); for ( i = 0 ; i < n ; i ++ ) { System . out . println ( ( i + 1 ) + " ▁ - > ▁ " + hash [ i ] ) ; } }