Ok lets say I have a list which generates values randomly and sometimes it generates the same value twice.
For example generated int value:
1, 1, 2, 3, 4
Then I have a method called duplicateTracker() and its job is to find duplicates within the list.
I have an idea that it should be done using if else statements. So if it detects duplicate numbers its then true, else false.
How do I do this?