java - Imported method will not work unless full class path is used -


i having trouble method can accessed using full class path, if try , import , call method, says method not defined current class. here screenshot of issue:

the error

"the method equalto(int) undefined type app"

if wish call method line 7 of screenshot indicates, need use static import:

import static org.hamcrest.matchers.equalto; 

this allow call method seem need:

equalto(5); 

Comments