String method not implementing

Main.java:12: error: cannot find symbol
if(str.length==1)
^
symbol: variable length
location: variable str of type String
Main.java:16: error: cannot find symbol
int y=stringToInt(str.subString(1));
^
symbol: method subString(int)
location: variable str of type String
Main.java:19: error: cannot find symbol
x=x*Math.pow(10,str.length-1) + y;
^
symbol: variable length
location: variable str of type String
3 errors

please share your complete code by saving it on ide.codingblocks.com