please check my mistakes
class Main{
public static String pi(String str,int i){
if(str.length()<=1)
return str;
if(i==str.length()-1)
return re;
String re;
if(str.charAt(i)==‘p’ && str.charAt(i+1)=‘i’)
{
re=str.substring(0,i)+“3.14”+str.substring(i+1);
return pi(str,i+2);
}
else
return pi(str,i+1);
}
public static void main(String args[]){
String d=pi(“apidpi”,0);
System.out.println(d);}}