How would you write a Java program to check if a string is a palindrome?
To check if a string is a palindrome, you can iterate through the string and compare each character to its reverse counterpart.
You're on the right track, but reversing the string before comparing it isnâ€™t the most efficient approach.
How would you optimize the approach to check for a palindrome without reversing the string?