How to combine two object arrays in Java

I have this little script to get information from Excel files After collecting the information I need, I want to combine the two arrays into one Is that possible?

public Object[][] createData1() throws Exception {
    Object[][] retObjArr1 = data.getTableArray("C:\\Users\\OAH\\Workspaces\\Chrome2\\Testdata2.xls","Sheet1","normalCustomer");
    Object[][] retObjArr2 = data.getTableArray("C:\\Users\\OAH\\Workspaces\\Chrome2\\Testdata2.xls","Sheet2","langLogin");
    return(retObjArrCombined); //I want to return one array with both arrays
}

Solution

You can use system Arraycopy method (yes, all lowercase) Javadoc. You can use Java util. The arrays class does more with arrays

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>