Problem in compiling

import java.util.*;
public class Main {

public static double Convert(String str)
{
	if(str.length()==1)
	{
		return (int)str.charAt(0);
	}

	char c=str.charAt(0);
	int cc=(int)c;
	String ros=str.substring(1);
	int len=str.length();
	double rec=Convert(ros);
	double myres=rec+cc*Math.pow(10,len-1);

	return myres;
}

public static void main(String args[]) {
    Scanner sc=new Scanner(System.in);
	String str=sc.nextLine();
	double ans=Convert(str);
	System.out.println(ans);

}

}

where is the mistake?

hello @Kapsime_S
in order to take input string you have to use sc.next(); not sc.nextLine();
and make your convert function integer type .