Expand|Select|Wrap|Line Numbers
- String[][] header = { {"Display Name", "text" }, {"Status", "text"}, {"Creation time", "date" , "Y" },
- {"Order Number","text"}, {"State","text"}, {"Ticket Number", "text" }, {"Scenario Name", "text" }, {" ", " " }
- };
String[][] temp = new String[header.length+1][];
Copied the header into temp
Expand|Select|Wrap|Line Numbers
- for (int y = 0; y < header.length; y++){ temp[y] = header[y];
- }
- //(System.arraycopy(header, 0, temp, 0, header.length); also used
- Then assigned the values,
- temp[temp.length-1][0] = " ";
- temp[temp.length-1][1] = " ";
- temp[temp.length-2][0] = "Display Name";
- temp[temp.length-2][1] = "text";
header = temp;
The issue is, the new array containing same value at header.length-1 and header.length-2, i.e, both contains "Display Name" and "text"
I want "Display Name", "text" should be at header.length-2 and " ", " " at header-1.
Can anybody please help me out.
Thanks in advance
Naresh