javadz̸
———————————————————
¸¶³öµÄŬÁ¦·Ç³£ÈËËùÄÜÏëÏó
————————————————————
ÄÇÎÒ¿ÉÒԿ϶¨µÄ˵£¬100¸ö³ÌÐòÔ±ÀïÖÁÉÙÓÐ10¸öÈ˸¶³öµÄŬÁ¦·Ç³£ÈËÏëÏ󣬵«ÊǼá³Ö³¬¹ýÈýÄêµÄ²»»á³¬¹ý5¸ö£¬³¬¹ý5ÄêµÄ²»»á³¬¹ý1¸ö
01Ä꿪ʼµ½ÏÖÔÚ¼ûµÄ³ÌÐòÔ±¶àÁË£¬ÈÏʶµÄÒ²¶àÁË£¬ÏñÂ¥Ö÷ÕâÑùÓоõÎòµÄÒ²¶àÁË£¬ÉõÖÁ¹¤×÷°ëÄêºóÓÐÂ¥Ö÷ÕâÑù¾õÎòµÄÈËÒ²¶àÁË¡£
ÔÚÕâÀï²¢²»ÊÇ°Ú×ʸñ£¬ËµÊ²Ã´01Äê 00Ä꣬ÔÚ±à³ÌÉÏÎÒ»¹²ÅÈëÃÅ£¬¾¡¹ÜÕâ5ÄêÀïÎÒÿÄêÐÝÏ¢µÄʱ¼äºÜÉÙ³¬¹ý10Ì죬ÿÌìºÜÉÙÁ賿1µãǰ˯¾õ£¨Á½ÄêÇ°¶¼ÊÇÁ賿2µã˯¾õ£©£¬¾¡¹ÜÎÒÖªµÀÒÔǰдµÄ´úÂë´ó²¿·Ö¶¼ÊÇÀ¬»ø£¬¾¡¹ÜÎÒÏÖÔÚ¿ÉÒÔ˵£¬ÎÒд³öµÄ´úÂë¾ø¶Ô²»ÊÇÀ¬»ø£¬»òÕßÁ½Äêºó»á˵ÏÖÔÚдµÄ¶«Î÷ÊÇÀ¬»ø¡£
¾¡¹ÜÄã¿ÉÒÔ˵Ä㶮¼Ü¹¹£¬¶®Éè¼Æ£¬¾«Í¨£¬Å££¬¸¶³öÁ˼è¿àµÄŬÁ¦£¬ÕâÑùµÄÈËÒ²¼û¶àÁË¡£
ÆäËûÏȲ»Ëµ£¬ÏÈ˵¥Ö÷µÄÒ»¾ä»°£º¹úÄÚµÄÈí¼þÆóÒµ×öµÄÈí¼þ¶¼ÊÇÀ¬»ø£¬Õâ¾ä»°ÎÒ¾ø¶ÔͬÒâ¡£
ΪºÎÊÇÀ¬»ø£º
1 ¿´¿´ÏÖÔڵijÌÐòÔ±£¬×öÁËÈýÄê ËÄÄ꣬ÉÔ΢ÓеãÄÜÁ¦£¬Óм¸¸ö°ÑÐÄ˼·ÅÔÚѧϰ¹¤×÷ÉÏ£¬ÂúÄÔ×Ó¿ª¹«Ë¾£¬½Ó˽µ¥£¬ÉÏ°àʱ¼ä˯¾õ£¬ÍíÉÏ×öµ¥£»ÉÏ°àʱ¼äÈ¥×ßÀÈ̸ÊÂÇ飬»òÕßÓÃMSN QQ¸ú¿Í»§ÁÄÒµÎñ¡£
2 ÓжàÉÙÈËÊÇÈÏ×¼Ò»Ãż¼Êõ£¬²»·ÖÖçÒ¹µÄѧϰ£¬ÓÖÓжàÉÙÈËÊÇ¿´µ½¹¤×ʸ߾ÍÌø²Û£¬¶ø²»¹Üѧϰ»·¾³£¬¸öÈË·¢Õ¹ÈçºÎ——ÀýÈç×öÍâ°ü
3 ÓжàÉÙÈËΪÁË×êÑÐÒ»¸öÎÊÌ⣬¼¸¸öÐÇÆÚÂúÄÔ×Ó˼¿¼ÈçºÎ½â¾ö£¬²»¶ÏµÄµ÷ÊÔÑо¿¡£——ºÃÏó´ó²¿·ÖÈ˶¼ÊÇÓÐÎÊÌâ¾Í·¢Ìû×ÓÌáÎÊ£¬Ö±½ÓÒª´úÂ룬¸üÓÐÉõÕߣ¬ÎÒÒ²¾³£Óöµ½£¬¾³£ÓÐÈËÎÊÓÐÉ̳ǴúÂëÂð£¬ÓÐOA´úÂë
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......
public class Factory {
private static Factory factory;
private static Object classLock=Factory.class;
private Factory(){}
public static Factory getFactory(){
synchronized(classLock){
......
Ê®¶þ javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(ÀàµÄ¼Ì³Ð)
/**
* ÀàµÄ¼Ì³Ð
*/
class Person
{
private String name;
private int age;
public String setName(String name){this.name = name;return name;}
public int setAge(int age){this.age = age;return age;}
public void getInfo ......