摘要: jsp页面用getAttribute()获得的对象是Object()类型的,若要存放到list或者是arraylist中需要强制转换ArrayList alBookList=request.getAttribute("bookList"); 出现Type mismatch: cannot conve... 阅读全文
posted @ 2015-08-20 16:29 lshblogs 阅读(1325) 评论(0) 推荐(0) 编辑
摘要: public class StringAndStringBuffer { public static void main(String[] args) { String str1="hello"; String str2="he"+"llo"; String str3="he"+new String 阅读全文
posted @ 2015-08-19 16:41 lshblogs 阅读(2405) 评论(0) 推荐(0) 编辑
摘要: ArrayList 采用的是数组形式来保存对象的,这种方式将对象放在连续的位置中,所以最大的缺点就是插入删除时非常麻烦 LinkedList 采用的将对象存放在独立的空间中,而且在每个空间中还保存下一个链接的索引 但是缺点就是查找非常麻烦 要丛第一个索引开始Hashtable和HashMap... 阅读全文
posted @ 2015-08-18 17:35 lshblogs 阅读(3613) 评论(0) 推荐(0) 编辑
摘要: 1 package com.ls.service; 2 3 import java.util.*; 4 import com.ls.domain.Book; 5 import com.sun.media.sound.AlawCodec; 6 public class MyCartSe... 阅读全文
posted @ 2015-08-18 17:23 lshblogs 阅读(1149) 评论(0) 推荐(1) 编辑