Object:是类层次结构的根类,所有类都直接或者间接的继承自该类。 Scanner:获取键盘录入数据的 String:针对字符串的常见操作的 StringBuffer/StringBuilder:字符串缓冲区类,提高字符串的操作效率 Arrays:针对数组进行操作的工具类 Integer:把int ...
分类:
编程语言 时间:
2016-04-16 15:07:39
阅读次数:
134
题目来源 https://leetcode.com/problems/merge-sorted-array/ Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. No ...
分类:
编程语言 时间:
2016-04-15 13:46:50
阅读次数:
181
Question: Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + n from digits of t ...
分类:
其他好文 时间:
2016-04-14 14:20:18
阅读次数:
162
Besides converting arrays and promises to Observables, we can also convert other structures to Observables. This lesson teaches how we can convert any ...
分类:
Web程序 时间:
2016-04-14 01:22:55
阅读次数:
231
The of() operator essentially converted a list of arguments to an Observable. Since arrays are often how we structure list of things in JavaScript, we ...
分类:
Web程序 时间:
2016-04-14 01:17:04
阅读次数:
225
Does the model binder not suport arrays of JSON objects? The code below works when sending a single JSON domain object as part of the ajax post. Howev ...
分类:
Web程序 时间:
2016-04-13 14:35:16
阅读次数:
185
一、有四种方式查询数组中是否包含某个值 1、使用List 2、使用Set 3、使用简单的循环 4、使用Arrays.binarySearch(),但这个方法只接受已经排好序的数组 二、计算以上四种方式的时间复杂度 1、测试数组的元素个数分别为:5 , 1000, 10000 Result: Use ...
分类:
编程语言 时间:
2016-04-13 13:01:07
阅读次数:
191
在java数组、Collection和Map的排序中,经常会用到Comparable和Comparator这两个接口。 1、Comparable 我们可以通过Arrays.sort()方法给数组排序: Arrays就是通过将数组中的对象转型为Comparable,再通过compareTo方法进行大小 ...
分类:
编程语言 时间:
2016-04-10 21:17:07
阅读次数:
244
计算中间两个数的平均值 没被hard难住,这题就是归并排序的应用,注意空指针 ...
分类:
其他好文 时间:
2016-04-10 12:48:12
阅读次数:
149
1.在values下创建arrays.xml文件 2.在arrays.xml中使用<string-array>或者<int-array>标签定义数组 name 定义数组的名字 item子类 用于定义数组的元素值 3.引用数组资源 在java代码中使用: Resources resource = ge ...
分类:
移动开发 时间:
2016-04-10 11:33:28
阅读次数:
228