Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java ֪ʶµã×ܽá

//java½âÎö.mdbÎļþµÄ±íÃû¼¯ºÏ 
this.tableList.clear();
  
  conn = null;
  st = null;
  rs = null;
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  String url ="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+dbName;//´ËΪNO-DSN·½Ê½ 
  //System.out.println("mdbÎļþ·¾¶£º"+dbName);
  
  conn=DriverManager.getConnection(url);
  conn.setCatalog(dbName);
  ResultSet tables = conn.getMetaData()
    .getTables(dbName,null,null,new String[]{"TABLE"});
 
  while(tables.next()){
   String str = tables.getString(3);//getXXX can only be used once here
   tableList.add(str);
  }


Ïà¹ØÎĵµ£º

Java¶ÔÏó´®Ðл¯ÊµÀý

 1.StudentList.java:
/**
 *
 * @author lucifer
 */
package JavaSerializable;
import java.util.*;
import java.io.*;
public class StudentList implements Serializable{
     Vector list = new Vector(6);
     public StudentList(){} ......

java·´Éä³£¼û·½·¨

»ñÈ¡classÀà·½·¨£º
1£¬getClass 2£¬Class.forName() 3,ÓÃ.class
public Field[] getDeclaredFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐÀàÐ͵ıäÁ¿£¬²»°üÀ¨¼Ì³Ð¸¸ÀàµÄ
public Field[] getDeclaredFields(String name)
·µ»ØÌض¨Ãû×Ö
public Field[]  getFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐpublicÀàÐ͵ıäÁ¿£¬°üÀ¨¼Ì³Ð¸¸Àൠ......

javaÎļþ²Ù×÷

 1.´´½¨Îļþ¼Ð 
File myFolderPath = new File(%%1); 
try { 
if (!myFolderPath.exists()) { 
     myFolderPath.mkdir(); 


catch (Exception e) { 
System.out.println("н¨Ä¿Â¼²Ù×÷³ö´í"); 
e.printStackTrace();  ......

javaÐÔÄÜÓÅ»¯¼¼ÇÉ

1.1 ²»ÓÃnew¹Ø¼ü´Ê´´½¨ÀàµÄʵÀý
¡¡¡¡
¡¡¡¡ÓÃnew¹Ø¼ü´Ê´´½¨ÀàµÄʵÀýʱ£¬¹¹Ô캯ÊýÁ´ÖеÄËùÓй¹Ô캯Êý¶¼»á±»×Ô¶¯µ÷Óᣵ«Èç¹ûÒ»¸ö¶ÔÏóʵÏÖÁËCloneable½Ó¿Ú£¬ÎÒÃÇ¿ÉÒÔµ÷ÓÃËüµÄclone()·½·¨¡£clone()·½·¨²»»áµ÷ÓÃÈκÎÀ๹Ô캯Êý¡£
¡¡¡¡
¡¡¡¡ÔÚʹÓÃÉè¼ÆÄ£Ê½£¨Design Pattern£©µÄ³¡ºÏ£¬Èç¹ûÓÃFactoryģʽ´´½¨¶ÔÏó£¬Ôò¸ÄÓÃclone( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ