title: Java array help (fixed)
body: <p>I posted a question earlier without trying it out because I was so lost. I tried it out and got some of it done using Google. Here are the questions:</p>
  
  <p>--</p>
  
  <p>Write a method sumWithoutSmallest that computes the sum of an array of values, except for the smallest one, in a single loop, update the sum and the smallest value. After the loop, return the difference. </p>
  
  <p>Add a method removeMin to the previous question that removes the minimum score. </p>
  
  <p>Prompt the user to enter the size of your array, and then use a random number generator to generate different integer numbers to initialize your array. </p>
  
  <p>--</p>
  
  <p>Here's what I have:</p>
  
  <p>--</p>
  
  <pre><code> public class Test {
  
          public static void main(String[] args)
          {
              sumWithoutSmallest();
          }
          public static int sumWithoutSmallest()
          {  
              int numbers[] = {1,2,3,4,5,6,7,8,9,10};
              int smallestNum = Integer.MAX_VALUE;
              int sum = 0; 
              for (int i : numbers) 
              { 
                  if(smallestNum &gt; i)
                  smallestNum = i; 
                  sum=sum+i;
              } 
              sum=sum-smallestNum;
              System.out.println(sum); 
              return sum - smallestNum; 
          }
      }
  
  --
  </code></pre>
  
  <p>I'm stuck on the 2nd question. How I understand it, it's asking me to remove the element with the lowest value, but is it even possible to do so? Thanks</p>