Cannot instantiate the type Map<String,Boolean>
2014-12-14 15:38
721 查看
无法实例化类型Map<String,Boolean>
错误代码:
原来是抽象接口,不能直接实例化,需要使用它的实现类;
正确写法如下:
错误代码:
Map<String, Boolean> modelPropertys = new Map<String, Boolean>();看了一下Map的定义,public abstract interface java.util.Map
原来是抽象接口,不能直接实例化,需要使用它的实现类;
正确写法如下:
Map<String, Boolean> modelPropertys = new HashMap<String, Boolean>();
相关文章推荐
- Cannot instantiate the type List<View>
- Cannot instantiate the type List<Integer>
- The type JComboBox is not generic; it cannot be parameterized with arguments <String>错误
- Cannot instantiate the type List<Integer>
- Cannot instantiate the type List<Product>
- Type mismatch: cannot convert from Enumeration<String> to Enumeration<Object>
- The type List is not generic; it cannot be parameterized with arguments <Integer>
- the type List is not generic; it cannot be parameterized with arguments<T>解决办法
- inline javascript cannot have the string "</script>"
- Android错误:方法setListAdapter(ArrayAdapter<String>) is undefined for the type String
- 无法实例化类型Map<String,Boolean>
- <转> com.google.gson.internal.StringMap cannot be cast XXX(整理)
- List<Map<String,String>>快速排序、
- struts2 Map<String,Object>session心得 浅析
- velocity 循环Map<String,Map<String,Long>>
- Tomcat --> Cannot create a server using the selected type
- List<? extends Map<String, ?>>
- vector<string>::size_type与string::size_type
- javaBean与Map<String,Object>互转
- hdu 1075 What Are You Talking About< map<string,string> >