Java
文章平均质量分 57
hebzai2005
这个作者很懒,什么都没留下…
展开
-
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 · 358 阅读 · 0 评论 -
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 阅读 · 0 评论 -
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 · 660 阅读 · 0 评论 -
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 · 235 阅读 · 0 评论 -
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 · 187 阅读 · 0 评论 -
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 · 291 阅读 · 0 评论