ITeye博客

Fox_ed的博客

Fox_ed · 共 5 篇文章

Array

多线程操作ArrayList实现同步 Collections集合操作工具类,把Arraylist封装成线程安全的。 List list = Collections.synchronizedList(new ArrayList());

2013-02-04 17:20 · 评论(0)

几种排序方法的实现

public class Sort{ /** * 直接插入排序 * @param arr * @return */ public static int[] insertSortImpl(int[] arr) { if(arr != null && arr.length > 0) { int length = arr.length; for(int i = 1; i < length; i++) { int currentData = arr[i]; int tmp = i; while(tmp > 0 && arr[tmp - 1] > currentData) { arr[tmp] = a…

2013-01-31 15:07 · java · 评论(0)

单链表的简单实现

1、单链表的存储结构 /** * 单链表 * @author fox * */ public class Node { private Object nodeValue; private Node nextNode; public Node() { nodeValue = null; nextNode = null; } public Node(Object item) { nodeValue = item; nextNode = null; } public Node(Object item, Node next) { nodeValue = item; nextNode = next; …

2013-01-25 16:18 · java · 评论(0)

线性表的简单实现

用Java写的一个线性表的简单实现 1、接口设计 package linearTable; /** * 线性表的接口设计 * @author fox * */ public interface LinearList { public boolean isEmpty(); public int size(); public Object get(int index); public void set(int index,Object e); public boolean add(int index, Object o); public boolean add(Object o); public…

2013-01-25 10:49 · java · 评论(0)

start with hello world

转眼做开发已经快一年。 有些东西还是看了就会了,会了不用,又忘了。 所以打算以后将一些小知识都保存在这里。 从helloworld开始吧 public class HelloWorld { public static void main(String[] args) { System.out.println("HelloWorld!"); } } JQuery MiniUI http://www.miniui.com/demo/#src=datagrid/celledit.html

2013-01-21 15:00 · java · 评论(0)