title: Passing and Getting array as parameter to a function in java
body: <p>Can anyone help me with returning array from a function <code>X()</code>. I want to pass that array to a function <code>Y()</code> as parameter in same class.</p>
  
  <p>What I have:</p>
  
  <pre><code>int[] create()throws IOException {
      System.out.println("Enter Size of Array");
      BufferedReader b=new BufferedReader(new InputStreamReader(System.in)); 
      n=Integer.parseInt(b.readLine());
      //A=new int[n];
      System.out.println("Enter Array"); for(i=0;i&lt;n;i++) {
          int y=Integer.parseInt(b.readLine());
          A[i]=y;
      }
      return A;
  }
  
  void getarray() {
  }
  </code></pre>