Need help: input int from console and pass it into method in different class
<p>i'm a beginner, Need help, Please!!!</p>

<p>I want to read number "a" from console and then store them in variable to use as passing to a different class (different .java file).</p>

<p>How do i code the 2 classes? 
thanks</p>

<pre><code>public class PassedInMethod{ 

   private int a;

   public PAssMethod(int a) { 
      a = a; // TODO: where to get the a? 
      System.out.println("a was passed in!"+a);
   }
} 



public class Mainclass {

  public static void main( String args[] ) {
      Scanner input = new Scanner( System.in );

      int a;

      System.out.print( "Enter your nember: " );
      a = input.nextInt();

      PassedInMethod(int a);
   }
}
</code></pre>
