import static com.example.hello.Tools.*;
public class MAINCLASS{
public void run(){
runtools(); // this works
}
private class People{
public void runpeople(){
runtools(); // this does not work.
}
}
}
Inside Tools…
Edit: When I roll over runtools() in People.runpeople()…I get this:
The method runtools() is undefined for the type MAINCLASS.People
public class Tools {
public void runtools() {
....
}
}
Does anyone know why?
You need to declare
Tools#runtools()staticto be able toimport staticit.Either that, or instantiate
Toolsand then callruntools()on it.