I have this homework from the school, however Im not sure Im doing wrong the second array does not takes the values of the first one, can you help me please?
public static void main(String[] rpp) {
String[] word = new String[7];
word[0] = "D";
word[1] = "E";
word[2] = "N";
word[3] = "T";
word[4] = "I";
word[5] = "S";
word[6] = "T";
String[] inverseWord = new String[7];
inverseWord[0] = "";
inverseWord[1] = "";
inverseWord[2] = "";
inverseWord[3] = "";
inverseWord[4] = "";
inverseWord[5] = "";
for(int x = word.length;x <= 0;x--){
for(int y = 0;y <= word.length;y++){
inverseWord[y] = word[x];
}
}
System.out.print(Arrays.toString(inverseWord) + "\n");
}