ArrayList ans = new ArrayList<>();
what is the meaning of this line?
hey @arya_31, it is creating an arraylist, but you should mention datatype.