⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e347. creating a copy of a collection.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
These examples create a shallow copy of a collection. That is, the new collection contains references to same objects as the source collection; the objects are not cloned. 
    List stuff = Arrays.asList(new String[]{"a", "b"});
    
    // Make a copy of a list
    List list = new ArrayList(stuff);
    List list2 = new LinkedList(list);
    
    // Make a copy of a set
    Set set = new HashSet(stuff);
    Set set2 = new TreeSet(set);
    
    // Make a copy of a map
    Map map = new HashMap();
    // Add key/value pairs ...
    Map map2 = new TreeMap(map);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -