I have
Element list = doc.select(“table”).get(0);
some times there is no table present, but I am still doing get so I am
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
How to get out of this exception?
there is no size as this is element
Elements is the object returned from a select.
and it has a size method.
So you can call: