报错:Cannot instantiate the type Map(String ,Object)

错误信息

Cannot instantiate the type Map<String,Object>

无法实例化Map

错误代码

       //航节信息验证
        Map<String,Object>  fisrstMapSection = new Map<String, Object>();

错误原因

这里是对基础知识不好导致,map是一个抽象的接口,不能直接实例化,可以使用它的具体的实现类

        Map<String,Object>  fisrstMapSection = new HashMap<String, Object>();

猜你喜欢

转载自blog.csdn.net/stonennnn/article/details/80684969