title: Finding a return value while passing n variables in a method
body: <pre><code>int add3(int...numbers)
  {
      for(int number : numbers)
      {
          int number1=0;
          number1= number+number1;
      }
      return number1;
  }
  </code></pre>
  
  <p>This is what I have written to find out the summation of n numbers while being passed through a method. I am getting an error while getting the return value i.e. the number1 variable cannot be resolved to a variable type.</p>