Luk*_*rog 17
您要么创建一个类型的对象,Other然后在该对象上调用该方法:
//in the Test class
Other obj = new Other();
obj.methodFromOther();
Run Code Online (Sandbox Code Playgroud)
或者如果方法是静态的,只需调用:
//in the Test class
Other.methodFromOther();
Run Code Online (Sandbox Code Playgroud)
也许你应该按照本教程来学习java编程语言.