LTIMindtree Interview Question

How do you handle NoSuchElementException