title: Java variable declaration
body: <p>Ok, this might be basic, but I want good programmers' opinions on this.</p>
  
  <p>What is a good way to handle variables in a small class file?</p>
  
  <p>I like modularizing methods and keeping methods that do really specific things.
  I end up passing variables between those methods. Is it a good practice to make variables used across many methods as member variables? Or is it better to pass the variables to methods? </p>
  
  <p>For example: </p>
  
  <pre><code>class Test{
      somefunction(int a, int b, int c, int d) {
          doSomething(a, b, c);
          doOneMoreThing(a, c, d);
      }
      void doSomething(int a, int b, int c) { }
      void doOneMoreThing(int a, int c, int d) { }
   }
  </code></pre>
  
  <p>In the above example, do you think the variables should be kept as member variables?
  Please explain why one methodology is preferred over the other.</p>