集是不重复元素的结合。集不保留顺序,默认是以哈希集实现 默认情况下,Scala 使用的是不可变集合,如果你想使用可变集合,需要引用 scala.collection.mutable.Set 包 1 集 Set-创建 Set不可变集合的创建 val set = Set(1, 2, 3) //不可变 p ...
分类:
其他好文 时间:
2020-07-08 01:36:36
阅读次数:
72
?## Java 集合框架 学习目标 会使用集合存储数据 遍历集合,取出数据 掌握每种集合的特性 学习方法 学习顶层!通过顶层接口/抽象类的共性方法,所有子类都可以使用 使用底层!顶层无法创建对象,需要使用具体的实现类创建对象 框架图 第一章 Collction集合 一种工具,放在java.util ...
分类:
编程语言 时间:
2020-07-07 23:33:19
阅读次数:
81
class ValuePair{ constructor(key,value){ this.key = key; this.value = value; } } function defaultToString(item){ if(item == null){ return 'null'; } if ...
分类:
编程语言 时间:
2020-07-07 15:20:49
阅读次数:
62
https://stackoverflow.com/questions/4629800/how-to-use-fiddler-to-monitor-wcf-service You need to add this in your web.config <system.net> <defaultPro ...
分类:
其他好文 时间:
2020-07-07 15:00:34
阅读次数:
51
We have a wooden plank of the length n units. Some ants are walking on the plank, each ant moves with speed 1 unit per second. Some of the ants move t ...
分类:
其他好文 时间:
2020-07-07 10:21:05
阅读次数:
78
C:\WINDOWS\system32>npm install vue-cli -g npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm W ...
分类:
其他好文 时间:
2020-07-06 12:56:06
阅读次数:
289
题目描述: 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 示例: 输入: [0,1,0,3,12]输出: [1,3,12,0,0]说明: 必须在原数组上操作,不能拷贝额外的数组。尽量减少操作次数。 来源:力扣(LeetCode)链接:https:// ...
分类:
移动开发 时间:
2020-07-06 10:56:02
阅读次数:
64
问题描述 删除链表中等于给定值 val 的所有节点。 代码 1 class Solution { 2 public: 3 ListNode* removeElements(ListNode* head, int val) { 4 ListNode *prehead = new ListNode(-1 ...
分类:
其他好文 时间:
2020-07-05 17:06:05
阅读次数:
55
We have a wooden plank of the length n units. Some ants are walking on the plank, each ant moves with speed 1 unit per second. Some of the ants move t ...
分类:
其他好文 时间:
2020-07-05 13:12:51
阅读次数:
66
Map(映射) 一. Map<K,V> Map是映射的顶级接口,实现类主要有:HashMap(重点) HashTable(面试)。 特点: 将键映射到值的对象(键值对) 键唯一,值不唯一。即一个键只能映射一个值,一个值可以对应多个键。 键值对在map中以entry结构储存。 无法保证元素的存入顺序 ...
分类:
其他好文 时间:
2020-07-04 20:27:23
阅读次数:
88