1class MyClass
2{
3 //Variable I want to return
4 private int[] numArray = {1, 2, 3};
5
6 public int[] getNumArray() {
7 return numArray.clone();
8 }
9 }
1MyClass newClassObj = new MyClass();
2int[] secondArray = newClassObj.getNumArray();