Dao层代码: 1 package com.it.dao; 2 3 public interface SayHell { 4 public void sayHello(); 5 } Dao的Impl实现层: 1 package com.it.dao.impl; 2 3 import java.uti ...
分类:
编程语言 时间:
2016-07-15 19:59:29
阅读次数:
2051
在继承了ArrayAdapter重新getCount()的方法后,比如 public int getCount() { return 3; } 若在活动中调用setAdapter()的方法前,List集合中没有数据,比如,需要同步加载服务器的数据,此时就会造成list集合中没有数据, 但是重写了ge ...
分类:
其他好文 时间:
2016-07-14 03:06:38
阅读次数:
192
1.1.1 Struts2中封装复杂类型的数据: 封装到List集合: 页面: 商品名称:<input type="text" name="products[0].pname"/><br/> 商品价格:<input type="text" name="products[0].price"/><br/ ...
分类:
其他好文 时间:
2016-07-14 02:48:57
阅读次数:
135
一、EL表达式简介 EL 全名为Expression Language。EL主要作用: 1、获取数据 EL表达式主要用于替换JSP页面中的脚本表达式,以从各种类型的web域 中检索java对象、获取数据。(某个web域 中的对象,访问javabean的属性、访问list集合、访问map集合、访问数组 ...
分类:
编程语言 时间:
2016-07-13 11:52:53
阅读次数:
202
2016年7月13日00:33:07 时的理解 List<?> 看作成一个类型, List<List<?>> list 表示成 此List里持有List集合,而持有的集合持有类型是某特定类型 new ArrayList<List<?>>() :ArrayList 将通过多态向上转型为List ,而此 ...
分类:
其他好文 时间:
2016-07-13 06:46:13
阅读次数:
344
目录: 备注:文内代码具有关联性。 1.声明数组; 2.初始化数组; 3.查看数组长度; 4.遍历数组; 5.int数组转成string数组; 6.从array中创建arraylist; 7.数组中是否包含某一个值; 8.将数组转成set集合; 9.将数组转成list集合; 10.Arrays.fi ...
分类:
编程语言 时间:
2016-07-12 22:59:43
阅读次数:
206
一、泛型出现的原因
首先,我们先看一个例子,如下:
public class ListErr {
public static void main(String[] args) {
//创建一个只想保存字符串的List集合
List strList = new ArrayList();
strList.add("Hello World");
strList.add("Goo...
分类:
编程语言 时间:
2016-07-11 12:34:37
阅读次数:
194
1.1: List.add方法——向集合列表中添加对象 public static void main(String[] args) { List<String> list=new ArrayList<String>(); list.add("保护环境"); //向列表中添加数据 list.add( ...
分类:
其他好文 时间:
2016-07-07 19:06:01
阅读次数:
153
1.首先在web.xml配置 2.书写DataDictionaryListener类 3.从内存中取出每个code对应的list集合dataDictionaryService方法 获取到该code对应的arrayList数据。 ...
分类:
其他好文 时间:
2016-07-07 12:28:39
阅读次数:
132
目录: 备注:内容中代码具有关联性。 1.list中添加,获取,删除元素; 添加方法是:.add(e); 获取方法是:.get(index); 删除方法是:.remove(index); 按照索引删除; .remove(Object o); 按照元素内容删除; 2.list中是否包含某个元素; 方法 ...
分类:
编程语言 时间:
2016-07-06 21:46:23
阅读次数:
193