I tried to make sure if the user entire statement is symmetric or not by trying this code but it's not working how can i compare the last character with the last one ?
public static void main(String[] args) {
Scanner s=new Scanner (System.in);
System.out.println("plz enter your string ");
String UserEntier=s.nextLine();
int j=UserEntier.length();
for (int i=0;i<j;i++){
if (UserEntier.charAt(i)==UserEntier.charAt(j));
{System.out.println(UserEntier.charAt(i)+UserEntier.charAt(j));j--;}
else
System.out.println("not a symmetric statement");}}