- 博客(8)
- 资源 (5)
- 收藏
- 关注
原创 2.1-2
//Rewrite the INSERTION-SORT procedure to sort into nonincreasing instead of non- decreasing order. for j = 2 to A.length key = A[j] i = j - 1 while i >0 and A[i] < key A[i +1] = A[i]
2012-08-17 03:36:36 223
原创 Define and output a file
private BufferedWriter writer; try { writer = new BufferedWriter(new FileWriter("log.txt")); } catch(Exception e){ System.out.println(e.getMessage()); }
2012-06-22 15:54:43 189
原创 How to traverse Hashtable in Java
a very simple example from my own project private void removeClassFromStudents(Semester s, String code) { Hashtable studList = s.getStudentsEnrolled(); for(Iterator i = studList.keySet().iterato
2012-06-22 15:49:03 293
原创 some simple Java GUI skills
just learned a little Java gui skills. I think I need to write down these codes so that I can review them in future. the default code for jList is like this: jListPerson.setModel(new jav
2012-06-01 14:26:42 360
原创 good encapsulation
This code is generated by NetBeans. Although it is very simple, it is a good way to understand encapsulation. jButtonAdd.setText("Add"); jButtonAdd.addActionListener(new java.awt.ev
2012-06-01 13:13:40 180
转载 How to use Iterator in Java
// Demonstrate iterators. import java.util.*; class IteratorDemo { public static void main(String args[]) { // create an array list ArrayList al = new ArrayList(); // add elements to the array l
2012-05-20 22:18:20 237
原创 Fuzzy String Matching Algorithm in Java
Source: http://www.codeproject.com/Articles/162790/Fuzzy-String-Matching-with-Edit-Distance I made a little modification to the original code, if you want to read the original code, just click th
2012-05-19 17:42:33 665
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人