@@ -0,0 +1,714 @@
+import java.util.*;%0A%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner sc = new Scanner(System.in);%0A        String word = sc.next();%0A        sc.close();%0A%0A        System.out.println(isPalindrome(word) ? %22Yes%22 : %22No%22);%0A%0A    %7D%0A%0A    private static boolean isPalindrome(String word) %7B%0A        return word.equals(reverse(word));%0A    %7D%0A%0A    // Copied from%0A    // https://www.baeldung.com/java-reverse-string%0A    private static String reverse(String word) %7B%0A       if (word == null) %7B%0A           return word;%0A       %7D%0A%0A       String output = %22%22;%0A%0A       for (int i = word.length() - 1; i %3E= 0; i--) %7B%0A           output = output + word.charAt(i);%0A       %7D%0A%0A       return output;%0A    %7D%0A%7D%0A

Solve java reverse string