title: How to pass multiple array to constructor in java?
body: <p>I have a problem passing a multiple array to constructor. 
  Can we actually do that or not?</p>
  
  <pre><code>public class First {
  public String[] a;
  public String[] b;
  public First(String[] a, String[] b){
      this.a=a;
      this.b=b;
  }
  }
  </code></pre>
  
  <p>And the next code is where I'm using class First.</p>
  
  <pre><code>Scanner ss =  new Scanner(System.in); 
  int x; 
  System.out.print("How many lines? "); 
  x = ss.nextInt();
  for(int i=0; i&lt;x; i++){
  System.out.print("A: "); a[i]=ss.nextString();
  System.out.print("B: "); b[i]=ss.nextString();
  }
  First ff= new First(a,b);
  </code></pre>
  
  <p>In NetBeans, there is no error, but I can't use it in another class. </p>
  
  <p>I'd be thankful if you would help me.</p>