title: How to remove int from arrayList
body: <pre><code>import java.util.*
  class Main {
    public static void main(String[] args)
    {
      int [] random = new int [25];
      int [] masking_array = new int [25];
      int [] array = new int [25];
      Scanner scanner = new Scanner(System.in);
      int number;
      int token = 3;
  
      for (int x = 0; x&lt;random.length; x++)
      random [x] = x+1;
  
      int rand;
      for (int x = 0; x&lt;random.length; x++)
      {
        rand = (int)(Math.random()*25);
        while (random[rand] == -1)
        rand = (int)(Math.random()*25);
        if (random[rand] != -1)
        array[x] = random [rand];
        random [rand] = -1;
      }
  
      for (int i = 0; i&lt; 25; i++) 
      {
        masking_array[i] = 0;
      }
  
      int bombCount = 0;
      while (bombCount &lt;10)
      {
        rand = (int)(Math.random()*25);
  
        if (masking_array[rand] == 0)
        {
          masking_array[rand] = 1;
          bombCount += 1;
        }
      }
  
      System.out.println();
      for (int x = 0; x&lt;array.length; x++)
      {
        if ( x % 5 == 0)
        {
          System.out.println();
        }
        System.out.printf(&quot;%03d &quot; , array[x]);
      }
      
      String s1 = &quot; &quot;;
      String s2 = &quot;-B-&quot;;
      for (int j = 0; j&lt;array.length; j++)
      {
        System.out.println(&quot;\nPlease enter a number&quot;);
        number = scanner.nextInt();
        for (int x = 0; x&lt;array.length; x++)
        {
          if (number == array[x] &amp;&amp; masking_array[x] == 1)
          {
            System.out.println(&quot;Boom&quot;);
            System.out.println(&quot;Token left is: &quot;+(--token));
          }
          else if (number == array[x] &amp;&amp; masking_array[x] == 0)
          {
            System.out.println(&quot;Good try, proceed next&quot;);
            System.out.println(&quot;Token left is: &quot;+(++token));
          }
        }
      }
    }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/lmFjn.png" rel="nofollow noreferrer">current sample code</a></p>
  <p>I've attached both my current sample code and source code. How do I remove the number in the array list whenever the user input <em>the number</em>. For example, when the user input 020, how do I remove 020 from the array shown. Is it possible to remove it without converting it into string. Hopefully, the question is clear.</p>