package com.tn.collect; import java.util.ArrayList; import java.util.Iterator; class Product{ public Product() { super(); // TODO Auto-generated constructor stub } public Product(int id, String name, int price) { // TODO Auto-generated constructor st
一.背景 最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回List<对象>的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList错误,就细细
package com.test; import java.util.ArrayList;import java.util.Iterator;import java.util.List; public class ArrayListDemo { public static void main(String args[]){ List<String> list = new ArrayList<String>(); list.add("luo
package dataStructure; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; import java.io.*; class node { int to, dist; node(int t, int d) { to = t; dist = d; } } public class Graph { public stat
重写ArrayList类,为防止冲突,重写为MyArrayList,未继承Iterable类. public class MyArrayList<AnyType>{ int N=10; AnyType a[]; //定义一个数组,未分配空间 int theSize; public MyArrayList(){ clear(); } public void clear(){ theSize=0; increaseSpace(N); //对数组初始化,扩容为10 } public int size