What is wrong in this code?

package STRINGS;

import java.util.Scanner;

public class ISPALINDROME {

public static void main(String[] args) {
	Scanner scn = new Scanner(System.in);
	String str = scn.nextLine();
	System.out.println(Ispalindrome(str,0,str.length()-1));

}

public static boolean  Ispalindrome(String str, int left, int right) {
	
	if (str.length() == 0 || str.length() == 1) {
		return true;
	}
	if (str.charAt(left) == str.charAt(right)) {
		Ispalindrome(str,left+1,right-1);

	} else {
		return false;
	}
}

}

Hey @harsh.hj
Just a change
Add one more base Case
if(left>right) {
return true;
}
correct code :
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
String str = scn.nextLine();
System.out.println(Ispalindrome(str, 0, str.length() - 1));
}

public static boolean Ispalindrome(String str, int left, int right) {
	if(left>right) {
		return true;
	}
	if (str.length() == 0 || str.length() == 1) {
		return true;
	}
	if (str.charAt(left) == str.charAt(right)) {
		Ispalindrome(str, left + 1, right - 1);
	} else {
		return false;
	}
	return true;
}

}

why do you write return true at last of the function ispalindrome???

public static boolean Ispalindrome(String str, int left, int right) {
if(left>right) {
return true;
}
if (str.length() == 0 || str.length() == 1) {
return true;
}
if (str.charAt(left) == str.charAt(right)) {
return Ispalindrome(str, left + 1, right - 1); // phir yaha se return kro
} else {
return false;
}
}