This question is extremely broad and open to many fine grained details...but if your looking for a good way to check for duplicate elements, use a Set. See The Set Interface (The Java™ Tutorials >...