title: Using Scanner as a parameter of a method
body: <p>Basically I am trying to use a scanner as a method. This is what I have (I've used <code>int</code> in the meantime because I have not been able to figure out how to use Scanner as a parameter)</p>
  
  <pre><code>public class LoopPatterns {
  
      public static int sum(int number1, int number2){
          int sum = number1 + number2;    
          return sum; 
      }
      public static void main(String[] args) {    
          System.out.println(sum(3, 4));
      }
  }
  </code></pre>
  
  <p>So this is what I have so far. However, the main point is that I need to get the sum of an unspecified amount of digits. I need to use a scanner but I haven't been able to figure out how to use it as a parameter of my method. Anyway, I hope that was concise enough. Thanks!</p>