Bug in Java7 driver code


Argh! Struggled for 20 minutes just to figure out there’s a bug in the Java7 driver code.
It wasn’t printing [1] [2] [3 5] [4] … for the one with 8 strings.
When I ran it on Java8 it worked.


was facing same issue … got help from your comment


Dude how much i wish i had read your comment before seeking help…lost all points while my code was right from the beginning.


thanks man you saved a lot of time.


I wish I had read this earlier…wasted a lot of time in discovering this bug


Right! Wasted time debugging the correct code.