what is the code required to:

search for and print all objects that match the term the user enters

i.e - when i select this function it should pop up a message that allows me to enter a string value. it then searches through my arraylist for any objects with matching string values and prints theme

i remember using this function before but cannot remember the code.