我有一个名为AttachmentsBean
的类,它有一个名为showUploadDialog()
的方法。在名为UploadBean
另一个类,当我执行下面的代码:不能从静态上下文中引用不同类的非静态方法
if(count=0)
{
return AttachmentsBean.showUploadDialog();
}
我得到的错误:
"Non-static method cannot be referenced from a static context".
请建议。