javaÉè¼Æģʽ
1.factoryÒòΪ¹¤³§Ä£Ê½¾ÍÏ൱ÓÚ´´½¨ÊµÀý¶ÔÏóµÄnew£¬ÎÒÃǾ³£Òª¸ù¾ÝÀàClassÉú³ÉʵÀý¶ÔÏó£¬
ÈçA a=new A() ¹¤³§Ä£Ê½Ò²ÊÇÓÃÀ´´´½¨ÊµÀý¶ÔÏóµÄ£¬ËùÒÔÒÔºónewʱ¾ÍÒª¶à¸öÐÄÑÛ£¬ÊÇ·ñ¿ÉÒÔ¿¼ÂÇʵÓù¤³§Ä£Ê½£¬
ËäÈ»ÕâÑù×ö£¬¿ÉÄܶà×öһЩ¹¤×÷£¬µ«»á¸øÄãϵͳ´øÀ´¸ü´óµÄ¿ÉÀ©Õ¹ÐԺ;¡Á¿ÉÙµÄÐÞ¸ÄÁ¿¡£
2.PrototypeģʽÔÊÐíÒ»¸ö¶ÔÏóÔÙ´´½¨ÁíÍâÒ»¸ö¿É¶¨ÖƵĶÔÏ󣬸ù±¾ÎÞÐèÖªµÀÈκÎÈçºÎ´´½¨µÄϸ½Ú,
¹¤×÷ÔÀíÊÇ:ͨ¹ý½«Ò»¸öÔÐͶÔÏ󴫸øÄǸöÒª·¢¶¯´´½¨µÄ¶ÔÏó£¬Õâ¸öÒª·¢¶¯´´½¨µÄ¶ÔÏóͨ¹ýÇëÇóÔÐͶÔÏó¿½±´ËüÃÇ×Ô¼ºÀ´ÊµÊ©´´½¨¡£
3.BuilderģʽÊÇÒ»²½Ò»²½´´½¨Ò»¸ö¸´ÔӵĶÔÏó,ËüÔÊÐíÓû§¿ÉÒÔֻͨ¹ýÖ¸¶¨¸´ÔÓ¶ÔÏóµÄÀàÐͺÍÄÚÈݾͿÉÒÔ¹¹½¨ËüÃÇ.
Óû§²»ÖªµÀÄÚ²¿µÄ¾ßÌå¹¹½¨Ï¸½Ú.BuilderģʽÊǷdz£ÀàËƳéÏ󹤳§Ä£Ê½,ϸ΢µÄÇø±ð´ó¸ÅÖ»ÓÐÔÚ·´¸´Ê¹ÓÃÖвÅÄÜÌå»áµ½.
4.SingletonģʽÖ÷Òª×÷ÓÃÊDZ£Ö¤ÔÚJavaÓ¦ÓóÌÐòÖУ¬Ò»¸öÀàClassÖ»ÓÐÒ»¸öʵÀý´æÔÚ¡£ Ôںܶà²Ù×÷ÖУ¬
±ÈÈ罨Á¢Ä¿Â¼ Êý¾Ý¿âÁ¬½Ó¶¼ÐèÒªÕâÑùµÄµ¥Ï̲߳Ù×÷¡£»¹ÓÐ, singletonÄܹ»±»×´Ì¬»¯; ÕâÑù£¬
¶à¸öµ¥Ì¬ÀàÔÚÒ»Æð¾Í¿ÉÒÔ×÷Ϊһ¸ö״̬²Ö¿âÒ»ÑùÏòÍâÌṩ·þÎñ£¬±ÈÈ磬ÄãÒªÂÛ̳ÖеÄÌû×Ó¼ÆÊýÆ÷£¬
ÿ´Îä¯ÀÀÒ»´ÎÐèÒª¼ÆÊý£¬µ¥Ì¬ÀàÄÜ·ñ±£³ÖסÕâ¸ö¼ÆÊý£¬²¢ÇÒÄÜsynchronizeµÄ°²È«×Ô¶¯¼Ó1£¬
Èç¹ûÄãÒª°ÑÕâ¸öÊý×ÖÓÀ¾Ã±£´æµ½Êý¾Ý¿â£¬Äã¿ÉÒÔÔÚ²»Ð޸ĵ¥Ì¬½Ó¿ÚµÄÇé¿öÏ·½±ãµÄ×öµ½¡£
5.facadeΪ×ÓϵͳÖеÄÒ»×é½Ó¿ÚÌṩһ¸öÒ»ÖµĽçÃæ.ÀàËÆÓÚ½Ó¿ÚµÄʹÓ㬽«¾³£Ê¹ÓõĴúÂë³éÈ¡³öÀ´£¬
×ö³ÉÒ»¸ö½Ó¿Ú£¬±ãÓڵijÌÐòµÄÀ©Õ¹ºÍʹÓá£Îª×ÓϵͳÖеÄÒ»×é½Ó¿ÚÌṩһ¸öÒ»ÖµĽçÃæ.
facadeʵ¼ÊÉÏÊǸöÀí˳ϵͳ¼ä¹Øϵ,½µµÍϵͳ¼äñîºÏ¶ÈµÄÒ»¸ö³£Óõİ취¡£
6.ProxyÊDZȽÏÓÐÓÃ;µÄÒ»ÖÖģʽ,¶øÇÒ±äÖֽ϶à,Ó¦Óó¡ºÏ¸²¸Ç´ÓС½á¹¹µ½Õû¸öϵͳµÄ´ó½á¹¹,
ProxyÊÇ´úÀíµÄÒâ˼,ÎÒÃÇÒ²ÐíÓдúÀí·þÎñÆ÷µÈ¸ÅÄî,´úÀí¸ÅÄî¿ÉÒÔ½âÊÍΪ:ÔÚ³ö·¢µãµ½Ä¿µÄµØÖ®¼äÓÐÒ»µÀÖмä²ã,ÒâΪ´úÀí.
ΪʲôҪʹÓÃProxy?
1.ÊÚȨ»úÖÆ ²»Í¬¼¶±ðµÄÓû§¶Ôͬһ¶ÔÏóÓµÓв»Í¬µÄ·ÃÎÊȨÀû,ÈçJiveÂÛ̳ϵͳÖÐ,¾ÍʹÓÃProxy½øÐÐÊÚȨ»úÖÆ¿ØÖÆ,
·ÃÎÊÂÛ̳ÓÐÁ½ÖÖÈË:×¢²áÓû§ºÍÓοÍ(δע²áÓû§),JiveÖоÍͨ¹ýÀàËÆForumProxyÕâÑùµÄ´úÀíÀ´¿ØÖÆÕâÁ½ÖÖÓû§¶ÔÂÛ̳µÄ·ÃÎÊȨÏÞ.
2.ij¸ö¿Í»§¶Ë²»ÄÜÖ±½Ó²Ù×÷µ½Ä³¸ö¶ÔÏó,µ«ÓÖ±ØÐëºÍÄǸö¶ÔÏóÓÐËù»¥¶¯.
¾ÙÀýÁ½¸ö¾ßÌåÇé¿ö:
(1)Èç¹ûÄǸö¶ÔÏóÊÇÒ»¸öÊǺܴóµÄͼƬ,ÐèÒª»¨·ÑºÜ³¤Ê±¼ä²ÅÄÜÏÔʾ³öÀ´,ÄÇôµ±Õâ¸öͼƬ°üº¬ÔÚÎĵµÖÐʱ,ʹÓñà¼Æ÷»òä¯ÀÀÆ÷´ò¿ªÕâ¸öÎĵµ,
´ò¿ªÎĵµ±ØÐëºÜѸË
Ïà¹ØÎĵµ£º
http://www.ibm.com/developerworks/cn/java/j-lo-hotswapcls/index.html
Java ÀàµÄÈÈÌæ»» —— ¸ÅÄî¡¢Éè¼ÆÓëʵÏÖ
¹¹½¨»ùÓÚ Java µÄÔÚÏßÉý¼¶ÏµÍ³
¼¶±ð£º Öм¶
Ëï Ãù
,
µË »Ô
,
2010 Äê 1 ÔÂ 14 ÈÕ
¶Ô
ÓÚÐí¶à¹Ø¼üÐÔÒµÎñ»òÕßÅÓ´óµÄ Java
ϵͳÀ´Ëµ£¬Èç¹û±ØÐëÔÝͣϵͳ·þÎñ²ÅÄܽøÐÐϵͳ ......
ÏÂÔصØÖ·£ºhttp://greenvm.googlecode.com/files/JTTSEngine.7z
£¨º¬Ê¾ÀýÓëÔ´Â룬Ŀǰ½öÌṩdll·â×°£©
ÖÚËùÖÜÖª£¬ËùνTTS¼´Text To SpeechµÄÓ¢ÎÄËõд£¬Ò²¾ÍÊÇ“´ÓÎı¾×ª»»µ½ÓïÒô”¡£
TTS¼¼ÊõµÄÖ÷Òª×÷ÓÃÔÚÓÚÀûÓüÆËã»úºÏ³ÉÈËÓ²¢½«ÎÄ×ÖÐÅϢת»¯ÎªÓïÒôÐÅÏ¢½øÐв¥·Å¡£¼òµ¥µã˵£¬TTS¼¼Êõ¸³ÓèÁ˼ÆËã»ú“¿ª¿Ú ......
ÔÚJava ÖÐÊý¾ÝÀàÐ͵Ä×Ô¶¯×ª»»ÀÏÊdzöÏÖһЩÎÊÌâ
byte b1 =1 , b2 = 12; //Äܹ»Í¨¹ý
byte b3 = 128 //±àÒëµÄʱºò²»ÄÜͨ¹ý
ÎÒÃÇÖªµÀJavaÖÐÊý¾ÝÀàÐÍbyte shout char ÔÚ½øÐмÆËãµÄʱºò¶¼ÊÇ» ......
Ò»¡¢Java³ÌÐò×é³É
java³ÌÐòÊÇÓÉÀà×é³ÉµÄ£¬ÎļþµÄÀàÐÍÊÇ*.java¡£Ò»¸öjavaÎļþµÄ×é³ÉÈçÏ£º
public class MyJava {
}
Õâ¾ÍÊÇÒ»¸ö×î¼òµ¥µÄjavaÀà¡£Õâ¾ä»°µÄ×÷ÓþÍÊÇÉùÃ÷Ò»¸öÀ࣬
public ·ÃÎÊÐÞ ......
´ó¼ÒºÃ£¡ ÎÒ½ÐСºÂ Ò²ÊǸտªÊ¼Ñ§ÓÃJAVA¿ª·¢WEBÏîÄ¿£¬Ï£Íû´ó¼Ò¸øÎÒ½¨ÒéÏ£¬ÓÐʲô·½·¨¿ÉÒÔѧºÃ£¬ÓãʣÁ£Ö£Á¿ª·¢WEBÏîÄ¿£¡~ ÏÖÔÚÎÒ»¹Ó¦¸Ãѧµãʲô Ï£Íû´ó¼Ò¶àÖ¸µãÖ¸µã~ ÎÒÏÖÔÚSSH ѧÍêÁË£¡ ´ó¼ÒÄÜÓÐʲôºÃµãµÄ½¨ÒéÂ𣿡¡¡¡ÓеĻ°ÁªÏµÏÂÎÒллÁË¡«¡¡ ......