I keep getting this error when making a search method in my code to search through string. I have gone through alot of examples trying to fix this but I cant find any. Thank
You are having exception at this line :
for (String item : notes)
notes is an ArrayList declared as raw type, although i don't see the declaration i can see this line of initialization:
notes = new ArrayList();
which sees it's element as of type Object You need to declare notes with ArrayList type such as:
ArrayList notes = new ArrayList<>();