1.值的转换在JavaScript中,一共有两种类型的值:原始值(primitives)和对象值(objects).原始值有:undefined, null, 布尔值(booleans), 数字(numbers),还有字符串(strings).其他的所有值都是对象类型的值,包括数组(arrays)和... ...
分类:
编程语言 时间:
2016-03-27 18:01:18
阅读次数:
208
1. 为什么使用接口 Java中的接口是一组对需求的描述。例如,以下是Comparable<T>接口的定义: Comparable<T>接口中定义了一个compareTo方法,这个方法就是它所描述的需求。若我们想调用Arrays.sort方法对一个People对象数组进行比较,那么People对象必 ...
分类:
编程语言 时间:
2016-03-27 09:46:02
阅读次数:
225
一、前言 整个集合框架的常用类我们已经分析完成了,但是还有两个工具类我们还没有进行分析。可以说,这两个工具类对于我们操作集合时相当有用,下面进行分析。 二、Collections源码分析 2.1 类的属性 public class Collections { // 二分查找阈值 private st ...
分类:
其他好文 时间:
2016-03-26 22:12:17
阅读次数:
662
//JSON – Properties 方便前台列表显示 //JSON – Column Arrays 方便前台图表使用 //JSON – Dictionary 更多信息参阅 Mr Data Converter ...
分类:
Web程序 时间:
2016-03-26 22:06:16
阅读次数:
259
文章目录如下 (1)自己的思路 (2)自己的代码 (3)别人的思路 (4)别人的代码 (5)对比自己的不足之处 题目如下: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the media ...
分类:
其他好文 时间:
2016-03-26 16:59:46
阅读次数:
116
题目:
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold addit...
分类:
其他好文 时间:
2016-03-17 14:46:59
阅读次数:
153
java.util.Arrays类也可以对Object数组进行排序,但是要使用这种方法排序必须实现Comparable接口,此接口就是用于指定对象排序规则的。 设计一个学生类,成绩由高到低排序,成绩相等,按年龄由低到高排序。
分类:
其他好文 时间:
2016-03-12 22:41:05
阅读次数:
137
本页包含内容: 集合的可变性(Mutability of Collections) 数组(Arrays) 集合(Sets) 字典(Dictionaries) Swift 语言提供Arrays、Sets和Dictionaries三种基本的集合类型用来存储集合数据。数组(Arrays)是有序数据的集。集
分类:
编程语言 时间:
2016-03-12 14:43:18
阅读次数:
302
public class S018 { //借鉴S015,速度有些慢 public List<List<Integer>> fourSum(int[] nums, int target) { Arrays.sort(nums); List<List<Integer>> result = new Ar
分类:
其他好文 时间:
2016-03-11 21:58:57
阅读次数:
137
public class S015 { //看了答案 public List<List<Integer>> threeSum(int[] nums) { Arrays.sort(nums); List<List<Integer>> result = new ArrayList<List<Intege
分类:
其他好文 时间:
2016-03-10 23:22:32
阅读次数:
203