主要有:1、数组array 2、ArrayList 3、HashTable
4、泛型集合List1、Array数组的特点是存储的类型统一,长度固定。在我们一开始声明数组的时候就得确定他的长度,堆内存就要分配相应大小的内存空间。所以比较静态,不灵活。2、解决Array的缺点,出现了ArrayL...
分类:
其他好文 时间:
2014-05-07 17:37:48
阅读次数:
391
优先级操作符描述例子结合性1()[]->.::++--调节优先级的括号操作符数组下标访问操作符通过指向对象的指针访问成员的操作符通过对象本身访问成员的操作符作用域操作符后置自增操作符后置自减操作符(a
+ b) / 4;array[4] = 2;ptr->age = 34;obj.age = 34;...
分类:
编程语言 时间:
2014-05-07 09:45:56
阅读次数:
396
Action代码: public function index(){
$prod = I("get.prod_en");
$id = I("get.id", 0, "int");
if ($prod == ""){
$serviceProduct = array();//多重循环遍历的数组 //数据保存在两张表中,这里通过循环初始化$serviceProduct数组...
分类:
Web程序 时间:
2014-05-07 07:13:02
阅读次数:
440
function FactoryXMLHttpRequest() {
if(window.XMLHttpRequest) {
return new XMLHttpRequest();
}else if(window.ActiveXObject) {
var msxmls = new Array(
'Msxml2.XM...
分类:
其他好文 时间:
2014-05-07 07:00:03
阅读次数:
382
[Question]
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to t...
分类:
其他好文 时间:
2014-05-07 05:37:44
阅读次数:
278
一 线性表
1.1 数组
1.1.1 Remove Duplicates from Sorted Array
1.1.2 Remove Duplicates from Sorted Array II
1.1.3 Search in Rotated Sorted Array
1.1.4 Search in Rotated Sorted Array II
1.1.5 Median of...
分类:
其他好文 时间:
2014-05-07 04:24:26
阅读次数:
363
很多人都知道java的反射机制和注解技术。反射(Reflection)就是加载类,并解剖出类的各个组成部分;而Annotation 其实就是代码里的特殊标记, 它用于替代配置文件,也就是说,传统方式通过配置文件告诉类如何运行,有了注解技术后,开发人员可以通过注解告诉类如何运行。那么两者结合能够产生出什么?
首先来看下面一个程序
{CSDN:CODE:326877}
回想我们以前产生Con...
分类:
编程语言 时间:
2014-05-07 03:55:22
阅读次数:
326
package com.array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import...
分类:
编程语言 时间:
2014-05-07 03:45:11
阅读次数:
365
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
You are given a target value to search. If found in the array retur...
分类:
其他好文 时间:
2014-05-06 19:03:11
阅读次数:
365
【Question】
Given an array S of n integers, are there elements a, b, c in S such
that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
Elements in ...
分类:
其他好文 时间:
2014-05-06 14:57:29
阅读次数:
318