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

Java ¶ÔÏóµÄ´æ´¢Î»ÖÃ

ժѡ×Ô¡¶Java±à³Ì˼Ïë¡·
1£® ¼Ä´æÆ÷£¨register£©¡£ÕâÊÇ×î¿ìµÄ´æ´¢Çø£¬ÒòΪËüλÓÚ²»Í¬ÓÚÆäËû´æ´¢ÇøµÄµØ·½——´¦ÀíÆ÷ÄÚ²¿¡£µ«ÊǼĴæÆ÷µÄÊýÁ¿¼«ÆäÓÐÏÞ£¬ËùÒԼĴæÆ÷ÓɱàÒëÆ÷¸ù¾ÝÐèÇó½øÐзÖÅä¡£Äã²»ÄÜÖ±½Ó¿ØÖÆ£¬Ò²²»ÄÜÔÚ³ÌÐòÖиоõµ½¼Ä´æÆ÷´æÔÚµÄÈκμ£Ïó¡£
2£®¶ÑÕ»£¨stack£©¡£Î»ÓÚͨÓÃRAM£¨random-access memory£¬Ëæ»ú·ÃÎÊ´æ´¢Æ÷£©ÖУ¬µ«Í¨¹ýËüµÄ“¶ÑÕ»Ö¸Õ딿ÉÒÔ´Ó´¦ÀíÆ÷ÄÇÀï»ñµÃÖ±½ÓÖ§³Ö¡£¶ÑÕ»Ö¸ÕëÈôÏòÏÂÒƶ¯£¬Ôò·ÖÅäеÄÄڴ棻ÈôÏòÉÏÒƶ¯£¬ÔòÊÍ·ÅÄÇЩÄÚ´æ¡£ÕâÊÇÒ»ÖÖ¿ìËÙÓÐЧµÄ·ÖÅä´æ´¢·½·¨£¬½ö´ÎÓڼĴæÆ÷¡£´´½¨³ÌÐòʱ£¬Java±àÒëÆ÷±ØÐëÖªµÀ´æ´¢ÔÚ¶ÑÕ»ÄÚËùÓÐÊý¾ÝµÄÈ·ÇдóСºÍÉúÃüÖÜÆÚ£¬ÒòΪËü±ØÐëÉú³ÉÏàÓ¦µÄ´úÂ룬ÒÔ±ãÉÏÏÂÒƶ¯¶ÑÕ»Ö¸Õë¡£ÕâÒ»Ô¼ÊøÏÞÖÆÁ˳ÌÐòµÄÁé»îÐÔ£¬ËùÒÔËäȻijЩJavaÊý¾Ý´æ´¢ÓÚ¶ÑÕ»ÖЗ—ÌرðÊǶÔÏóÒýÓ㬵«ÊÇJava¶ÔÏó²¢²»´æ´¢ÓÚÆäÖС£
3£® ¶Ñ£¨heap£©¡£Ò»ÖÖͨÓÃÐÔµÄÄÚ´æ³Ø£¨Ò²´æÔÚÓÚRAMÇø£©£¬ÓÃÓÚ´æ·ÅËùÓеÄJava¶ÔÏ󡣶Ѳ»Í¬ÓÚ¶ÑÕ»µÄºÃ´¦ÊÇ£º±àÒëÆ÷²»ÐèÒªÖªµÀÒª´Ó¶ÑÀï·ÖÅä¶àÉÙ´æ´¢ÇøÓò£¬Ò²²»±ØÖªµÀ´æ´¢µÄÊý¾ÝÔÚ¶ÑÀï´æ»î¶à³¤Ê±¼ä¡£Òò´Ë£¬ÔÚ¶ÑÀï·ÖÅä´æ´¢ÓкܴóµÄÁé»îÐÔ¡£µ±ÄãÐèÒª
´´½¨Ò»¸ö¶ÔÏóʱ£¬Ö»ÐèÓÃnewдһÐмòµ¥µÄ´úÂ룬µ±Ö´ÐÐÕâÐдúÂëʱ£¬»á×Ô¶¯ÔÚ¶ÑÀï½øÐд洢·ÖÅä¡£µ±È»£¬ÎªÕâÖÖÁé»îÐÔ±ØÐëÒª¸¶³öÏàÓ¦µÄ´ú¼Û¡£ÓöѽøÐд洢·ÖÅä±ÈÓöÑÕ»½øÐд洢´æ´¢ÐèÒª¸ü¶àµÄʱ¼ä£¨Èç¹ûȷʵ¿ÉÒÔÔÚJavaÖÐÏñÔÚC++ÖÐÒ»ÑùÓÃÕ»±£´æ¶ÔÏ󣩡£
4£® ¾²Ì¬´æ´¢£¨static storage£©¡£ÕâÀïµÄ“¾²Ì¬”ÊÇÖ¸“Ôڹ̶¨µÄλÖÔ£¨¾¡¹ÜÒ²ÔÚRAMÀ¡£¾²Ì¬´æ´¢Àï´æ·Å³ÌÐòÔËÐÐʱһֱ´æÔÚµÄÊý¾Ý¡£Äã¿ÉÓùؼü×ÖStaticÀ´±êʶһ¸ö¶ÔÏóµÄÌض¨ÔªËØÊǾ²Ì¬µÄ£¬µ«Java¶ÔÏó±¾Éí´ÓÀ´²»»á´æ·ÅÔÚ¾²Ì¬´æ´¢¿Õ¼äÀï¡£
5£®³£Á¿´æ´¢£¨constant storage£©¡£³£Á¿ÖµÍ¨³£Ö±½Ó´æ·ÅÔÚ³ÌÐò´úÂëÄÚ²¿£¬ÕâÑù×öÊÇ°²È«µÄ£¬ÒòΪËüÃÇÓÀÔ¶²»»á±»¸Ä±ä¡£ÓÐʱ£¬ÔÚǶÈëʽϵͳÖУ¬³£Á¿±¾Éí»áºÍÆäËü²¿·Ö¸ôÀ뿪£¬ËùÒÔÔÚÕâÖÖÇé¿öÏ£¬¿ÉÒÔÑ¡Ôñ½«Æä´æ·ÅÔÚROM£¨read-only memory£¬Ö»¶Á´æ´¢Æ÷£©ÖС£
6£® ·ÇRAM´æ´¢£¨non-RAM storage£©¡£Èç¹ûÊý¾ÝÍêÈ«´æ»îÓÚ³ÌÐòÖ®Í⣬ÄÇôËü¿ÉÒÔ²»ÊܳÌÐòµÄÈκοØÖÆ£¬ÔÚ³ÌÐòûÓÐÔËÐÐʱҲ¿ÉÒÔ´æÔÚ¡£ÆäÖÐÁ½¸ö»ù±¾µÄÀý×ÓÊÇ“Á÷¶ÔÏó£¨streamed object£©”ºÍ“³Ö¾Ã»¯¶ÔÏó£¨persistent object£©”¡£ÔÚ“Á÷¶ÔÏó”ÖУ¬¶ÔÏóת»¯³É×Ö½ÚÁ÷£¬Í¨³£±»·¢Ë͸øÁíһ̨»úÆ÷¡£ÔÚ“³Ö¾Ã»¯¶ÔÏó”ÖУ¬¶ÔÏó±»´æ


Ïà¹ØÎĵµ£º

Javaµ÷Óô洢¹ý³Ì


 
 
 
Javaµ÷Óô洢¹ý³Ì
±¾ÎIJûÊöÁËÔõôʹÓÃDBMS´æ´¢¹ý³Ì¡£ÎÒ²ûÊöÁËʹÓô洢¹ý³ÌµÄ»ù±¾µÄºÍ¸ß¼¶ÌØÐÔ£¬±ÈÈç·µ»ØResultSet¡£±¾ÎļÙÉèÄã¶ÔDBMSºÍJDBCÒѾ­·Ç³£ÊìϤ£¬Ò²¼ÙÉèÄãÄܹ»ºÁÎÞÕÏ°­µØÔĶÁÆäËüÓïÑÔд³ÉµÄ´úÂ루¼´²»ÊÇJavaµÄÓïÑÔ£©£¬µ«ÊÇ£¬²¢²»ÒªÇóÄãÓÐÈκδ洢¹ý³ÌµÄ±à³Ì¾­Àú¡£
´æ´¢¹ý³ÌÊÇÖ¸±£´æÔÚ ......

ÈçºÎÀûÓÃjavaµÃµ½µ±Ç°µÄʱ¼äºÍÇ°Ò»ÌìµÄʱ¼ä

1.µÃµ½µ±Ç°µÄʱ¼ä
Calendar cal = Calendar.getInstance();
String time=formatter.format(cal.getTime());
String strEnd=time.substring(0, 16);// 2007-10-30 09:30
Calendar cal = Calendar.getInstance();
String time=formatter.format(cal.getTime());
String strEnd=time.subst ......

Java EE Ö®JSP

 1.¸ÅÊö
JSPÊÇÒ»ÖÖʵÏÖÆÕͨ¾²Ì¬HTMLºÍ¶¯Ì¬HTML»ìºÏ±àÂëµÄ¼¼Êõ¡£
JSP×îÖջᱻת»»³É±ê×¼µÄServlet£¡£¡£¡
JSPÉè¼ÆµÄÄ¿µÄÔÚÓÚ¼ò»¯±íʾ²ãµÄ±íʾ¡£
JSPÒ³ÃæµÄÆäËû³É·ÖÖ÷ÒªÓÐÈçÏÂÈýÖÖ£º
½Å±¾ÔªËØ
Ö¸Áî
¶¯×÷
ÀýÈ磺
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*& ......

java¶ÁдËøʵÏÖ»úÖÆ

package thread.lock;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
 * @file_name ReadAndWriteLockDemo.java
 * @description ¶ÁÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ