Let's start small with the question: If you want to change your program to take 6 inputs instead of 5, which classes have to change? If your answer includes more than 1 class you're not following the [DRY](https://en.wikipedia.org/wiki/Don't_repeat_yourself) principle. This can be easily fixed by passing it in the constructor public UserInputDataHandler(int nbUserInputs){ this.USER_INPUTS = nbUserInputs; this.handler = new UserInputData[nbUserInputs]; } Next small thing is the method: public static void getUserInput(){ What I expect from a getSomething() method is that it returns that something. So instead of also putting it into the userInputContainer this method should just return it. While we're looking at this method, it would also be more logical to make sure that the input we're getting is a valid one. That way the rest of the program doesn't need to be conserned with checking this. So let's steal that inputIsValid method from UserInputData for now and put it next to this one. And then have another that keeps prompting the user until a valid input is given. public static int getValidUserInput(){ int userInput = getUserInput(); while(!inputIsValid(userInput)){ //optional here is to tell the user it was an invalid input userInput = getUserInput(); } return userInput; } public static int getUserInput(){ //ask user to enter a new value and store it in a variable return Integer.valueOf(JOptionPane.showInputDialog(null, "Enter a value between 10 and 100 inclusive)")) ; } public static boolean inputIsValid ( int input ){ //constants declaration final int UPPER_BOUND = 100 ; final int LOWER_BOUNDS = 10 ; //return boolean if data is valid or invalid return input >= LOWER_BOUNDS && input <= UPPER_BOUND; //notice how I removed the if(...){return true} else {return false} here } Since these 3 methods logically belong together along with the upper and lower bounds constants, you might as well put them inside their own class. For example a UserInputFetcher class. I'll let you do this on your own. --- Now for the major part. In my opinion making the user input numbers into a class was a little bit overkill. It's possible to make it work with just an int array int[] userInputs; public UserInputDataHandler(int nbUserInputs){ this.userInputs = new int[nbUserInputs] ; } But this requires some other changes as well. We first make it easy for ourselves by introducing a new variable: int nextNumberIndex = 0; This one keeps track of what index the next number should be inserted if it's unique. And to know which numbers in this array were input from the user. The numberAlreadyEntered method will change a bit. First of, I make it return a boolean so it answers the following question: Is this number new or a repeat? Now giving it a better name and changing the implementation results in this: public boolean isNewNumber(int newInput){ // the first number we see can't be a repeat if(nextNumberIndex < 1){ return true; } //go over the previous unique inputs and see if it's the same number for(int i = 0; i < nextNumberIndex; i++){ if(newInput == userInputs[i]){ return false; } } //out of for loop so have not seen it before return true; } But Imus you say, how do we then handle a new user input? Well we do the following: public void handleUserInput (int newInput) { if(!isNewNumber(newInput)){ return; //duplicate so don't need to do anything here } userInputs[nextNumberIndex] = newInput; nextNumberIndex++; } or public void handleUserInput (int newInput) { if(isNewNumber(newInput)){ userInputs[nextNumberIndex++] = newInput; } } depending entirely on your preference. I believe that with this you should be able to change the other methods accordingly. Hint: To print the unique numbers is the same for loop as used in the isNewNumber method. These changes will probably make the class UserInputData obsolete :) edit: An example since it wasn't clear yet: userInputs = {0,0,0,0,0} nextNumberIndex = 0 The user inputs: 10 userInputs = {10, 0, 0, 0, 0} nextNumberIndex = 1 output is 10 The user inputs: 12 userInputs = {10, 12, 0, 0, 0} nextNumberIndex = 2 output is 10, 12 The user inputs: 10 userInputs = {10, 12, 0, 0, 0} nextNumberIndex = 2 output is 10, 12 again notice how this input is completely ignored here, because it's a duplicate. The user inputs: 99 userInputs = {10, 12, 99, 0, 0} nextNumberIndex = 3 output is 10, 12, 99 The user inputs: 10 userInputs = {10, 12, 99, 0, 0} nextNumberIndex = 3 output is 10, 12, 99 again To print our result we use for(int i = 0; i < nextNumberIndex;i++){ //handle userInputs[i] } This will result in the numbers 10, 12, 99 (at the end) and stop because the next i is equal to nextNumberIndex so the for loop ends. These are exactly the non-duplicat numbers that we wanted. Good luck with the next version of your solution!