I am trying to find the value of str.substring(7) but I keep getting the error in the title. Why?
public class New
{
public String substring(int beginIndex, int endIndex)
{
var str = "Grand Canyon";
var res = str.substring(7);
}
}