永发信息网

The method put is not applicable for the arguments

答案:1  悬赏:80  手机版
解决时间 2021-01-21 00:47
  • 提问者网友:我们很暧昧
  • 2021-01-20 05:27
The method put is not applicable for the arguments
最佳答案
  • 五星知识达人网友:千杯敬自由
  • 2021-01-20 06:07
Map> m = new HashMap>();追问因为我可能要这样用
HashMap m = null;
if(是否是多个值)
{
m = new HashMap();
m.put("a", "aaa");
}
else
{
m = new HashMap>();
ArrayList l = new ArrayList();
l.add("aaa");
m.put("a", l);
}
但我不想在两个地方声明.追答汗。。。。。Map m=null; 试试!
Map m=new HashMap();
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯