本文主要是介绍No enclosing instance of type UpdataInfoParser is accessible. Must qualify the allocation with an en,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
错误提示:
No enclosing instance of type UpdataInfoParser is accessible. Must qualify the allocation with an enclosing instance of type UpdataInfoParser
(e.g. x.new A() where x is an instance of UpdataInfoParser).
解决方法:
静态方法只能调用静态内部类。
public class UpdataInfo前加上static。
public class UpdataInfoParser
{
public static UpdataInfo getUpdataInfo(InputStream is) throws Exception
{
UpdataInfo info = new UpdataInfo();
}
public class UpdataInfo
{
}
}
这篇关于No enclosing instance of type UpdataInfoParser is accessible. Must qualify the allocation with an en的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!