01 2016 档案

Java inheritance, composition, encapsulation and polymophism
摘要:Composition means HAS AInheritance means IS A Example: Car has a Engine and Car is a Automobile In programming this is represented as: Encapsulation i 阅读全文

posted @ 2016-01-31 23:31 touchdown 阅读(301) 评论(0) 推荐(0)

Java enum
摘要:An enum type is a special data type that enables for a variable to be a set of predefined constants. The constructor of enum must be private. It means 阅读全文

posted @ 2016-01-29 19:21 touchdown 阅读(142) 评论(0) 推荐(0)

Process's address space and heap
摘要:Typically, in each process, the virtual memory available to that process is called itsaddress space. Each process's address space is typically organiz... 阅读全文

posted @ 2016-01-27 12:03 touchdown 阅读(262) 评论(0) 推荐(0)

HashTable collision
摘要:HashTable is a data structure that maps key to values. No-null object is allowed by both key and value. In the context of a hash table, the term "coll 阅读全文

posted @ 2016-01-25 11:24 touchdown 阅读(213) 评论(0) 推荐(0)

Java final修饰词
摘要:大师傅 阅读全文

posted @ 2016-01-24 22:22 touchdown 阅读(204) 评论(0) 推荐(0)

java final
摘要:浅析Java中的final关键字 谈到final关键字,想必很多人都不陌生,在使用匿名内部类的时候可能会经常用到final关键字。另外,Java中的String类就是一个final类,那么今天我们就来了解final这个关键字的用法。下面是本文的目录大纲: 一.final关键字的基本用法 二.深... 阅读全文

posted @ 2016-01-24 22:20 touchdown 阅读(218) 评论(0) 推荐(0)

(转)Java静态变量,静态类,静态方法
摘要:静态变量和静态方法都属于静态对象,它与非静态对象的差别需要做个说明。 (1)Java静态对象和非静态对象有什么区别? 比对如下: 静态对象 非静态对象 拥有属性: 是类共同拥有的 是类各对象独立拥有的内存分配: 内存空间上是固定的 空间在各个附属类里面分配 分配顺序: 先分配静态对象的空间 继而再对 阅读全文

posted @ 2016-01-24 21:42 touchdown 阅读(146) 评论(0) 推荐(0)

Return
摘要:return在Java void方法里代表方法的终止。 阅读全文

posted @ 2016-01-24 21:31 touchdown 阅读(146) 评论(0) 推荐(0)

Vector and ArrayList in Java
摘要:Internally, both classes use array. Vector by default double the array size when array is full, while ArrayList increases the array size by 50%.Vector... 阅读全文

posted @ 2016-01-22 13:51 touchdown 阅读(112) 评论(0) 推荐(0)

递推,贪心,动态规划
摘要:DP——“下一步最优是从当前最优得到的”。最优可以是“longest", "shortest"等等。贪心——为了计算最终的最优解,需要计算当前的最优解递推——类似于斐波那契序列作者:王勐链接:http://www.zhihu.com/question/23995189/answer/35429905... 阅读全文

posted @ 2016-01-21 10:56 touchdown 阅读(170) 评论(0) 推荐(0)

复杂度分析
摘要:空间复杂度就是为了支持你的计算所必需存储的状态最多有多少,时间复杂度就是从初始状态到达最终状态中间需要多少步。 阅读全文

posted @ 2016-01-21 10:48 touchdown 阅读(102) 评论(0) 推荐(0)

BST: when to use i <= j or i < j
摘要:i seq, int target){ int lo = 0; int hi = seq.size() - 1; while(lo < hi) { int mid = lo + (hi - lo) / 2; if(seq.get(mid) < t... 阅读全文

posted @ 2016-01-20 22:20 touchdown 阅读(126) 评论(0) 推荐(0)

Interface VS Abstract Class
摘要:An abstract class can have shared state or functionality. An interface is only a promise to provide the state or functionality. A good abstract class ... 阅读全文

posted @ 2016-01-19 23:34 touchdown 阅读(186) 评论(0) 推荐(0)

HashMap VS BST
摘要:HashMap usually performs search operations bounded with complexity of O(1)<=T(n)<=O(n). BST performs search operations in O(logN)<=T(n)<=O(N).HashMap ... 阅读全文

posted @ 2016-01-19 22:37 touchdown 阅读(193) 评论(0) 推荐(0)

vector VS list in C++
摘要:vector is like ArrayList in Java.vector:Continuous memory.Underlying array implementation.Pre-allocate space for future element. This means extra spac... 阅读全文

posted @ 2016-01-19 16:04 touchdown 阅读(172) 评论(0) 推荐(0)

Java ArrayList构造分析
摘要:1 /** 2 * The array buffer into which the elements of the ArrayList are stored. 3 * The capacity of the ArrayList is the length of this... 阅读全文

posted @ 2016-01-19 15:05 touchdown 阅读(406) 评论(0) 推荐(0)

导航