Hi, I need some help on this one.
So if I created an array, lets say Object
test[] = new Object[10]
so test.length is 10. But I am going to fill the test array to 5.
When I use a loop(i<test.length) to look up the test[], I will encounter NPE at test[6,7,8..]. How do I avoid this NPE? Thanks