[Solved] Why am i NOT getting null pointer exception in this case while adding null to a list and sorting it

[ad_1]

That loop only goes to 4 for i, so you don’t end up inserting anything when you change the conditon to i == 5.

1

[ad_2]

solved Why am i NOT getting null pointer exception in this case while adding null to a list and sorting it