I need to write a program for someone to enter 5 numbers from 10 to 100 and eliminate duplicates. after entering 5 valid numbers, i get error,
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
at DuplicateElimination.main(DuplicateElimination.java:23)

I need to write a program for someone to enter 5 numbers from 10 to 100 and eliminate duplicates. after entering 5 valid numbers, i get error,
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
at DuplicateElimination.main(DuplicateElimination.java:23)

I figured it out,
i was using counter out of range.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.