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

JavaÓû§»Øµ÷·½·¨Ïû³ýÈßÓà´úÂë

Ò». ¿´Ò»¶ÎÈßÓàµÄ´úÂë
public String login(HttpServletRequest request){
   OperatorService operatorService = new OperatorService();
   WebContext webContext= request.getSession().getAttribute("WEB_CONTEXT_KEY");
Connection conn=null;
try{
      Conection conn =DBManager.getConnection();
       if(webContext.getOperatorName.equals("123")){
          // µÇ½³É¹¦
      }
}catch(Throwable t){
   //¼Ç¼ÈÕÖ¾
//Ìø×ªµ½Í³Ò»µÄ´íÎóÒ³Ãæ,²»ÄÜÈÃÓû§¿´µ½Òì³£Ò³Ãæ
       //¹Ø±ÕConnection
       if(conn!=null){
           try{conn.close();}cath(SQLException ex){}
     }
   }
}
public String logOut(HttpServletRequest request){
   OperatorService operatorService = new OperatorService();
   WebContext webContext= request.getSession().getAttribute("WEB_CONTEXT_KEY");
try{
       Conection conn =DBManager.getConnection();
        operatorService.logout();
      request.getSession().invalidate();
}catch(Throwable t){
   //¼Ç¼ÈÕÖ¾
//Ìø×ªµ½Í³Ò»µÄ´íÎóÒ³Ãæ,²»ÄÜÈÃÓû§¿´µ½Òì³£Ò³Ãæ
       //¹Ø±ÕConnection
       if(conn!=null){
           try{conn.close();}cath(SQLException ex){}
     }
   }
}
¶þ¡¢¿ÉÒÔ¿´µ½,ºìÉ«²¿·Ö´úÂëÍêÈ«ÊÇÈßÓàµÄ£¬ÏÂÃæÓûص÷·½·¨¼ò»¯Õⲿ·Ö´úÂë
1.Ïȶ¨ÒåÒ»¸ö»Øµ÷³éÏóÀà
public abstract class AppCallback {
    /**
    * »Øµ÷Ö´Ðз½·¨
    *
    * @return
    */
    public String execute() {
  &n


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔǰ£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

javaÖÐ×Ö·û´® MD5ÃÜÂëµÄ¼ÓÃÜÓëÑéÖ¤

Õª×Ô£ºjava JDK ʵÀý±¦µä
        MD5¼´Message-Digest Algorithm 5£¨ÐÅÏ¢-ÕªÒªËã·¨ 5£©£¬ÓÃÓÚÈ·±£ÐÅÏ¢´«ÊäÍêÕûÒ»Ö¡£ÊǼÆËã»ú¹ã·ºÊ¹ÓõÄÔÓ´ÕËã·¨Ö®Ò»£¨ÓÖÒëÕªÒªËã·¨¡¢¹þÏ£Ëã·¨£©£¬Ö÷Á÷±à³ÌÓïÑÔÆÕ±éÒÑÓÐMD5ʵÏÖ¡£
¡¡¡¡ ½«Êý¾Ý£¨È纺×Ö£©ÔËËãΪÁíÒ»¹Ì¶¨³¤¶ÈÖµÊÇÔÓ´ÕËã·¨µÄ»ù´¡Ô­À ......

Àí½âJavaÀà¼ÓÔØÔ­Àí

µÚÒ»²¿·Ö. Ìáʾ
ÎÒÐèÒª¶ÁÕâÆªÎÄÕÂÂð£¿
JavaÀà¼ÓÔØÆ÷¶ÔJavaϵͳµÄÔËÐÐÊÇÖÁ¹ØÖØÒªµÄ£¬µ«ÊÇÈ´³£³£±»ÎÒÃǺöÂÔ¡£JavaÀà¼ÓÔØÆ÷¸ºÔØ
ÔÚÔËÐÐʱ²éÕҺͼÓÔØÀà¡£×Ô¶¨ÒåÀà¼ÓÔØÆ÷¿ÉÒÔÍêÈ«¸Ä±äÀàµÄ¼ÓÔØ·½Ê½£¬ÒÔ×Ô¼ºÏ²»¶µÄ·½Ê½À´
¸öÐÔ»¯ÄãµÄJavaÐéÄâ»ú¡£±¾ÎļòÒªµÄ½éÉÜJavaÀà¼ÓÔØÆ÷£¬È»ºóͨ¹ýÒ»¸ö¹¹Ôì×Ô¶¨ÒåÀà¼ÓÔØÆ÷
µÄÀý×ÓÀ´ËµÃ÷£¬Õâ ......

Java ÀíÂÛºÍʵ¼ù: Á˽ⷺÐÍ

JDK 5.0 ÖÐÔö¼ÓµÄ·ºÐÍÀàÐÍ£¬ÊÇ Java ÓïÑÔÖÐÀàÐͰ²È«µÄÒ»´ÎÖØÒª¸Ä½ø¡£µ«ÊÇ£¬¶ÔÓÚ³õ´ÎʹÓ÷ºÐÍÀàÐ͵ÄÓû§À´Ëµ£¬·ºÐ͵ÄijЩ·½Ãæ¿´ÆðÀ´¿ÉÄܲ»ÈÝÒ×Ã÷°×£¬ÉõÖÁ·Ç³£Ææ¹Ö¡£ÔÚ±¾ÔµēJava ÀíÂÛºÍʵ¼ù”ÖУ¬Brian Goetz ·ÖÎöÁËÊø¸¿µÚÒ»´ÎʹÓ÷ºÐ͵ÄÓû§µÄ³£¼ûÏÝÚå¡£Äú¿ÉÒÔͨ¹ýÌÖÂÛÂÛ̳Óë×÷ÕßºÍÆäËû¶ÁÕß·ÖÏíÄú¶Ô±¾ÎĵĿ´·¨¡ ......

¶þ²æÊ÷ (Binary Tree) µÄ»ù±¾²Ù×÷ (Java)

package algorithm.binarytree;
import java.util.Arrays;
import java.util.Stack;
import util.ArrayUtil;
import util.OutputUtil;
public class BinTree {
    private BinNode root = null;
    public BinTree()
    {
    }
  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ