Consider the following method:
public static boolean isPalindrome(String word) {
int length = word.length();
for (int i = 0; i < length / 2; i++) {
if (word.charAt(i) != word.charAt(length - 1 - i)) {
return false;
}
}
return true;
}
Assume that the following code segment appears in a class:
boolean result = isPalindrome("racecar");
System.out.println("Is 'racecar' a palindrome? " + result);
What is printed as a result of executing the code segment?