I've only just started Java programming and I'm finding it difficult to understand the delete function here. Could someone please break it down for me so its easier to understand? Thanks.
public static void main(String[] args) { char[] source = {'H', 'A', 'P', 'P', 'Y', 'L', 'E', 'A', 'R', 'N', 'I', 'N', 'G'}; char[] destination = new char [7]; System.arraycopy(source, 0, destination, 1, 5); System.out.println(new String(destination)); //deleting element from array int flag = 3; for (int i = 0; i < source.length; i++) { //DELETE FUNCTION if (flag == i){ for(int j = i + 1; i < source.length - 1; j++){ source[i] = source[j]; i++; // } System.out.println(source);