list泛型总结 Map<String, Collection<?>> result = new HashMap<>(6);

list泛型总结 Map<String, Collection<?>> result = new HashMap<>(6);_第1张图片

package com.gang;

import java.util.*;

public class Harbor007 {
    public static void main(String[] args) {
       /* Calendar calendar = Calendar.getInstance();

        calendar.add(Calendar.SECOND,10);
        Date time = calendar.getTime();
        System.out.println(time);*/

      /*  HashSet set = new HashSet<>();
        set.add("1");
        set.add("1");
        set.add("1");
        System.out.println(set);*/

     /*   StringJoiner notFourMustError = new StringJoiner(",");
        notFourMustError.add("刘备");
        notFourMustError.add("王道哈哈");
            StringJoiner result = new StringJoiner(",");
        System.out.println(notFourMustError);

        result.add(notFourMustError + "部分事项未审核,请审核后在结束会议");

        System.out.println(result.toString());*/
        ArrayList list = new ArrayList<>();
        list.add("dada");
        ArrayList list1 = new ArrayList<>();
        list1.add(1);
        Map> result = new HashMap<>(6);
        result.put("gbrm06s", list);
        result.put("gbrm06", list1);

        List gbrm06s = (List) result.get("gbrm06s");
        System.out.println(gbrm06s);

        List gbrm060 = (List) result.get("gbrm06");
        System.out.println(gbrm060);


    }


    }

ArrayList list = new ArrayList<>();
list.add("dada");
list.add("dada");
list.add("dada");
System.out.println(list);
System.out.println(String.join(",", list));

 

 

你可能感兴趣的:(list,java,jvm)