Can anyone help me with returning array from a function X(). I want to pass that array to a function Y() as parameter in same class.
What I have:
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<n;i++) {
int y=Integer.parseInt(b.readLine());
A[i]=y;
}
return A;
}
void getarray() {
}