I'm using ArrayList<String>
and I add data at specific indices,
how can I check if a specific index exists?
Should I simply get()
and check the value? Or should I wait for an exception?
Is there another way?
Thank you for your answers, but because I'm only adding stuff at specific indices, the length of the list will not show me which are available.