摘要: 每个类都有toString ()方法,从object类继承而来。toString()方法代表一个类的字符串描述。当执行语句"System.out.println(类对象);" 时,会默认调用该类的toString()方法。由于object中的toString()方法用来输出类的内存地址等信息,所以有时候就需要对toString()方法进行改写,用于返回我们所需要的内容。 阅读全文
posted @ 2012-03-08 20:30 狐狸小艾 阅读(175) 评论(0) 推荐(0)
摘要: 今天看到的一个Blog上的内容,我把大致内容摘录下来,作为备忘。首先看一下LinkedList和ArrayList的继承关系。public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializablepublic class LinkedList<E> extends AbstractSequentialList<E> implements List<E>, Queue<E> 阅读全文
posted @ 2012-03-08 20:04 狐狸小艾 阅读(122) 评论(0) 推荐(0)
摘要: 1. 说明:复制表(只复制结构,源表名:a,新表名:b) SQL: select*into b from a where1<>1; 2. 说明:拷贝表(拷贝数据,源表名:a,目标表名:b) SQL: insertinto b(a, b, c) select d, e, f from b; 3. 说明:显示文章、提交人和最后回复时间 SQL: select a.title, a.username, b.adddate fromtable a,(selectmax(adddate) adddate fromtablewheretable.title=a.title) b 4. 说明:外 阅读全文
posted @ 2012-03-08 20:02 狐狸小艾 阅读(96) 评论(0) 推荐(0)