My Java code is here:
import java.util.Scanner;
public class task2 {
public static void main(String args[]) {
System.out.print(\"Input a 3 digit int
This is because the value of x is getting changed finally.Which is not the original number at the end of the program. SO take another variable just below x like: int y = x; And at the end while using "if" condition use this value of y for comparison rather than using x. It will run perfectly.
int x = scan.nextInt();
int y=x;
if (y == isPalindrome) Add new variable like this.