
public class StringPal {


	public static boolean palr(String s){

		if(s.length()==1 || s.length()==0){
			return true;
		}
		char i=s.charAt(0);
		char j=s.charAt(s.length()-1);

		if(i!=j){
			return false;
		}


		else{
			
			return palr(s.substring(1,s.length()-1));
			
		}
	}

	public static void main(String[] args) {

	System.out.println(palr("abcba"));
		

	}

}
