Answer:
The last element of data2 is ghi.
Step-by-step explanation:
In this code Arrays.copyOf() function copies the data of string data array into string data2 array by length-1 .Here string data array has 4 element in it but according to code i.e Arrays.copyOf(data, data.length - 1); string data2 will contains only 3 element.
So the last element is "ghi" ,second last element is "def" and first element is "abc: in data2 array.