You have defined the text() method inside of the main method. I would also recommend using a consistent style. Your errors will be easier to see if you do.
For example here is your code but formated differently
public class HelloWorld
{
public static void main(String[] args)
{
public void text()
{
sh.text("hello");
}
}
}
Now it is easier to see that text() is inside main.