title: not getting correct input for checking for duplicates
body: <p>for the problem, i am required to take in 10 integers, and then print out the unique numbers. My problem solving approach for this was to scan all the numbers behind the one we are checking to see if there are any duplicates. here's the code I have so far. if i enter in numbers like &quot;1234567891&quot;, it only will print &quot;pl: 1&quot; because I add the first number before running the algorithm. Any hypothesis on why it's not working?</p>
  <pre><code>//setup
  Scanner input = new Scanner(System.in);
  String text = input.nextLine();
  text = text.replaceAll(&quot;\\s&quot;,&quot;&quot;); //remove all spaces
  int[] intDigits = new int[10];
  
  //turn the string into an int array
  for (int i = 0; i &lt; 10; i++){
      intDigits[i] = text.charAt(i) - '0';
  }
  input.close();
  
  //add the first number since it will always be unique with my algorithm
  String pl = intDigits[0] + &quot; &quot;;
  
  //check every number behind the one we are checking, if all the numbers are not equal to the one we are checking, then add it to the string of unique numbers.
  for (int i = 1; i &lt; 10; i++) {
      int count = 0;
      for (int j = i-1; j &gt;= 0; j--) {
          if (intDigits[i] != intDigits[j]) {
              count++;
          }
      }
      if (count == i-1) {
          pl += intDigits[i];
      }
  }
  System.out.println(&quot;\n\npl: &quot; + pl);
  </code></pre>