Getting errors working with String Arrays

B/c field lasths[] hasn’t been explicitly initialized, it contains null.

Therefore, you can’t use the array access operator [] until you assign a String[] to it:

3 Likes