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

java ¼òµ¥¹¤³§Éè¼Æģʽ

ÏÈд³ÌÐò£¬ÔÚÀ´½âÊͼòµ¥¹¤³§ºÍ¹¤³§·½·¨Ä£Ê½¡£
1¡¢¶¨ÒåÒ»¸öÆû³µ½Ó¿Ú
package com.beckham.factory;
/**
* @author ×÷Õß<Beckham>
* Email:gaowm0207@gmail.com
* Jan 26, 2010 2:35:15 PM
* Version:1.0
*/
public interface Car {
public void start() ;
}

½Ó¿ÚÀïÃ涨ÒåÒ»¸ö·½·¨£ºstart()
2¡¢ÊµÏָýӿڵÄÆû³µ
±¼³Û
package com.beckham.factory;
/**
* @author ×÷Õß<Beckham>
* Email:gaowm0207@gmail.com
* Jan 26, 2010 3:07:25 PM
* Version:1.0
*/
public class Benz implements Car {
public void start() {
System.out.println("±¼³Û³µÆô¶¯ÁË¡£¡£¡£¡£");
}
}

°ÂµÏ
package com.beckham.factory;
/**
* @author ×÷Õß<Beckham>
* Email:gaowm0207@gmail.com
* Jan 26, 2010 3:07:46 PM
* Version:1.0
*/
public class Audi implements Car {
public void start() {
System.out.println("°ÂµÏ³µÆô¶¯ÁË¡£¡£¡£¡£¡£¡£");
}
}

µ½´Ë£¬ÒѾ­ÓÐ2ÖÖÆû³µÊµÏÖÁËÆû³µ½Ó¿Ú
package com.beckham.factory;
public class Test {
/**
* Owner
* Jan 26, 2010 2:37:11 PM
* @throws Exception
*/
public static void main(String[] args) throws Exception {


Car c = new Benz() ;
//Car c = new Audi() ;
c.start() ;

}
}

ÎÒÃÇ¿ÉÒÔͨ¹ý×Ô¼ºnew²»Í¬µÄ¶ÔÏ󣬴Ӷø´´½¨²»Í¬¶ÔÏóµÄʵÀýµ÷Óù²Í¬µÄstart·½·¨¡£
ÕâÊÇÎÒÃǾͻáÏ룬ÊDz»ÊÇ¿ÉÒ԰ѲúÉúÆû³µµÄ¹ý³Ì·ÅÔÚÒ»¸ö¹¤³§ÀïÃ棬¶øÎÒÃǵ÷ÓõÄʱºòÖ»ÐèÒª¸æËß¹¤³§ÎÒÃÇÐèÒªÄÄÖÖÆû³µ£¬¹¤³§¾Í·µ»Ø¸øÎÒÃǸÃÆû³µÄØ£¿ÄÇôÎÒÃǾʹ´½¨¸Ã¹¤³§¡£
package com.beckham.factory;
/**
* @author ×÷Õß<Beckham>
* Email:gaowm0207@gmail.com
* Jan 26, 2010 2:49:46 PM
* Version:1.0
*/
public class CarFactory {

/*
* carName ¾ÍÊÇÐèÒª¹¤³§²úÉúµÄ¶ÔÏó
* ͨ¹ý·´Éä»úÖÆÀ´»ñÈ¡¸Ã¶ÔÏóµÄʵÀý
*/
public static Car getInstance(String carName) throws Exception {
return (Car) Class.forName(carName).newInstance();
}
}

¹¤³§½ÓÊÜ´«µÝ¹ýÀ´µÄÆû³µµÄÃû³Æ£¬·µ»Ø¸ÃÆû³µµÄʵÀý
package com.beckham.factory;
public class Test {
/**
* Owner
* Jan 26, 2010 2:37:11 PM
*


Ïà¹ØÎĵµ£º

Java 6 RowSet ʹÓÃÍêÈ«ÆÊÎö

Java 6 RowSet ʹÓÃÍêÈ«ÆÊÎö
C# ÌṩÁË DataSet£¬¿ÉÒÔ½«Êý¾ÝÔ´ÖеÄÊý¾Ý¶ÁÈ¡µ½ÄÚ´æÖУ¬½øÐÐÀëÏß²Ù×÷£¬È»ºóÔÙͬ²½µ½Êý¾ÝÔ´¡£Í¬Ñù£¬ÔÚ Java ÖÐÒ²ÌṩÁËÀàËƵÄʵÏÖ£¬¼´ RowSet¡£javax.sql.rowset °üÏ£¬¶¨ÒåÁËÎå¸ö²»Í¬µÄ RowSet ½Ó¿Ú£¬¹©²»Í¬µÄ³¡ºÏʹÓᣱ¾ÎĽ«·Ö±ð¶ÔÕâÎå¸ö RowSet µÄʹÓó¡ºÏÒÔ¼°Ï꾡Ó÷¨½øÐнéÉÜ£¬²¢ÇÒÃèÊöÊ ......

Javaµ÷ÓÃSQL ServerµÄ´æ´¢¹ý³ÌÏê½â

1ʹÓò»´ø²ÎÊýµÄ´æ´¢¹ý³Ì
¡¡¡¡Ê¹Óà JDBC Çý¶¯³ÌÐòµ÷Óò»´ø²ÎÊýµÄ´æ´¢¹ý³Ìʱ£¬±ØÐëʹÓà call SQL תÒåÐòÁС£²»´ø²ÎÊýµÄ call תÒåÐòÁеÄÓï·¨ÈçÏÂËùʾ£º
¡¡¡¡
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
{call procedure-name}
¡¡¡¡×÷ΪʵÀý£¬ÔÚ SQL Server 2005 AdventureWorks ʾÀýÊý¾Ý¿âÖд´½¨ÒÔÏ´洢¹ý³Ì£º
¡¡¡¡
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º ......

Javaµ÷ÓÃϵͳÃüÁîѧϰ£¨Èý£©

ѧϰÁËÁ½ÆªµÄRuntimeÀ࣬ÏÖÔÚ¶ÔËüÓÐÁ˸üÉîÒ»²ãµÄÁ˽⣬ÄÇôÎÒÃÇÀ´¿´¿´ÏÂÃæµÄ´úÂ룺
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader ;
import java.io.BufferedReader;
public class Exec_Output{
public static void main(String []args)throws IOException,Int ......

javaºÍ¡£netÖ®¼äµÄ»¥²Ù×÷

.netÍøÕ¾theserverside.comÉÏ£¬ÓÐһƪ½².netºÍjava»¥²Ù×÷µÄÎÄÕ£¬ÊÕ¼¯ÁËnetºÍjava»¥²Ù×÷ÐÔµÄÎÄÕ¾«Ñ¡
[url]http://www.theserverside.net/tt/articles/showarticle.tss?id=InteropGuide[/url]
In the heterogeneous world of enterprise computing, interoperability is no longer a luxury but a necessity. The multip ......

MD5 java bean


/************************************************
MD5 Ëã·¨µÄJava Bean
*************************************************/
package beartool;
import java.lang.reflect.*;
public class MD5 {
    /* ÏÂÃæÕâЩS11-S44ʵ¼ÊÉÏÊÇÒ»¸ö4*4µÄ¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ