Iam trying to compare each string or int in array with another array then print the results according to whether the string exists or not in the other array: Below is the wh
You can't get ArrayList objects by using [] operator like arrays.Use get() method on ArrayList to get the objects. So change the code
[]
get()
ArrayList
if (Stocks[i].equals(NameofFileinDir[j])) > 0) {
to
if (Stocks[i].equals(NameofFileinDir.get([j]))) > 0) {