let's say I have a txt file containing:

```
john
dani
zack

```

the user will input a string, for example "omar"
I want the program to search that txt file for the String "omar", if it doesn't exist, simply display "doesn't exist".

I tried the function String.endsWith() or String.startsWith(), but that of course displays "doesn't exist" 3 times.

I started java only 3 weeks ago, so I am a total newbie...please bear with me.
thank you.