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

×Ô¶¯Éú³ÉJavaʵÌåÀà

JDBC¶ÁÈ¡Êý¾Ý¿âÔªÊý¾Ý,Éú³ÉJAVAʵÌåÀà
package com.nffish.util;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import com.nffish.common.DBSession;
public class GenEntityTool {
    private String tablename = "petDiary";
    private String[] colnames; // ÁÐÃûÊý×é
    private String[] colTypes; // ÁÐÃûÀàÐÍÊý×é
    private int[] colSizes; // ÁÐÃû´óСÊý×é
    private boolean f_util = false; // ÊÇ·ñÐèÒªµ¼Èë°üjava.util.*
    private boolean f_sql = false; // ÊÇ·ñÐèÒªµ¼Èë°üjava.sql.*
    public GenEntityTool() {
        Connection conn = DBSession.getConnection(); // µÃµ½Êý¾Ý¿âÁ¬½Ó
        String strsql = "select * from " + tablename;
        try {
            PreparedStatement pstmt = conn.prepareStatement(strsql);
            ResultSetMetaData rsmd = pstmt.getMetaData();
            int size = rsmd.getColumnCount(); // ¹²ÓжàÉÙÁÐ
            colnames = new String[size];
            colTypes = new String[size];
            colSizes = new int[size];
            for (int i = 0; i < rsmd.getColumnCount(); i++) {
                colnames[i] = rsmd.getColumnName(i + 1);
                colTypes[i] = rsmd.getColumnTypeName(i + 1);
        &n


Ïà¹ØÎĵµ£º

javaÕýÔò±í´ïʽ

   ÔÚʹÓÃRegularExpressionValidatorÑéÖ¤¿Ø¼þʱµÄÑéÖ¤¹¦Äܼ°ÆäÑéÖ¤±í´ïʽ½éÉÜÈçÏÂ:
Ö»ÄÜÊäÈëÊý×Ö£º“^[0-9]*$”
Ö»ÄÜÊäÈënλµÄÊý×Ö£º“^d{n}$”
Ö»ÄÜÊäÈëÖÁÉÙnλÊý×Ö£º“^d{n,}$”
Ö»ÄÜÊäÈëm-nλµÄÊý×Ö£º“^d{m,n}$”
Ö»ÄÜÊäÈëÁãºÍ·ÇÁ㿪ͷµÄÊý×Ö£º“^(0|[1- ......

Effective Java ѧϰ±Ê¼Ç£¨2£©

 ÓÐʱ£¬ÎÒÃÇÔÚдһ¸ö¹¹Ô캯Êýʱ£¬¾­³£ÒòΪËü°üº¬ÖÚ¶àµÄ²ÎÊý¶ø¿àÄÕ,Õâʱ¿ÉÒÔ¿¼ÂÇÓÃBuilderģʽÀ´´´½¨¶ÔÏó¡£
È磬ÎÒÃÇÒªÉè¼ÆÒ»¸öÓªÑø³É·ÝµÄÀ࣬°üº¬ÄÜÁ¿£¬µ°°×ÖÊ£¬Ö¬·¾£¬¸Æ£¬Ìú£¬Ð¿£¬Î¬ÉúËØA, άÉúËØB1 ... µÈ£¬µ«ÔÚ¹¹ÔìµÄʱºò£¬²»Ò»¶¨Ã¿´Î¶¼ÐèÒªÕâЩ²ÎÊý£¬Èç¸Æ£¬Ìú£¬Ð¿ºÍάÉúËصÈÊÇ¿ÉÑ¡µÄ£¬ÎªÁËÊÊÓ¦¶àÖÖ¿ÉÄܵĴîÅ䣬±È ......

arcgis server9.3 for java °²×°

   ArcGIS Server9.3ÍêÕûÇåÎú°²×°Á÷³Ì
ÒÔϵÄArcGIS Server9.3°²×°Á÷³ÌÊÇÎÒ¸öÈË×ܽá³öÀ´µÄ£¬ÔÚwindowXP2Ñé֤ͨ¹ý£¬ÐèÒªµÄ»°£¬Ï£ÍûÓõÄ×Å¡£
    Ò»¡¢ArcGIS Server²úÆ·°üÀ¨Á½¸ö²¿·Ö£º
     1¡¢GIS Server£¬ËüÊÇÒ»¸öÌṩGIS·þÎñµÄ·þÎñÆ÷Èí¼þ²úÆ·£¬°üÀ¨Ò»ÏµÁкËÐÄAO¿âºÍÒ»¸ö¹ ......

javaÖÐÖØдequals·½·¨

import java.util.Date;
class Dog{
 private String name;
 private Date birthday;
 
 
 public String getName() {
  return name;
 }
 public void setName(String name) {
  this.name = name;
 }
 public Date getBirthday() {
  return b ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ