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

JavaµÄ´úÀíģʽÀý×Ó

(1).  ´´½¨Ò»¸ö½Ó¿Ú, Òª´úÀíµÄÀàºÍ ´úÀíÀ඼½«¼Ì³ÐËü
package stone;
public interface Image {
    public void show();
}
(2). ´´½¨Òª±»´úÀíµÄÀà:
package stone;
public class BigImage implements Image {
    public BigImage() {
        try {
            Thread.sleep(3000);                      // Ä£Äâ´óͼƬҪÓó¤Ê±¼äÀ´¼ÓÔØ
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("loading big image ");
    }
    public void show() {
        System.out.println("show image");
    }
}
(3). ´´½¨´úÀíÀà
package stone;
public class TestProxy {
    public static void main(String[] args) {
        long start= System.currentTimeMillis();
        Image image= new ImageProxy(null);
        System.out.println("Load time:"+String.valueOf(System.currentTimeMillis()-start));
        image.show();
        System.out.println("Show time:"+String.valueOf(System.currentTimeMillis()-start));
    }
}
(4). ÔËÐвâÊÔÀà,²âÊÔ´úÀíģʽ:
package stone;
public class TestProxy {
    public static void main(String[] args) {
        long start= System.currentTimeMillis();
        Image image= new ImageProxy(null);
        System.out.println("Load time:"+String.valueOf(Syste


Ïà¹ØÎĵµ£º

javaÓïÑÔÔÚ»¥ÁªÍøʱ´ú»ñµÃ¾Þ´ó³É¹¦

1995Ä꣬ÃÀ¹úSun Microsystems¹«Ë¾ÕýʽÏòITÒµ½çÍƳöÁËjavaÓïÑÔ£¬¸ÃÓïÑÔ¾ßÓа²È«¡¢¿çƽ̨¡¢ÃæÏò¶ÔÏó¡¢¼òµ¥¡¢ÊÊÓÃÓÚÍøÂçµÈÏÔÖøÌص㣬µ±Ê±ÒÔwebΪÖ÷ÒªÐÎʽµÄ»¥ÁªÍøÕýÔÚѸÃÍ·¢Õ¹£¬javaÓïÑԵijöÏÖѸËÙÒýÆðËùÓгÌÐòÔ±ºÍÈí¼þ¹«Ë¾µÄ¼«´ó¹Ø×¢£¬³ÌÐòÔ±ÃǷ׷׳¢ÊÔÓÃjavaÓïÑÔ±àдÍøÂçÓ¦ÓóÌÐò£¬²¢ÀûÓÃÍøÂç°Ñ³ÌÐò·¢²¼µ½ÊÀ½ç¸÷µØ½øÐÐÔËÐС ......

javaµÄ¹¤×÷Ô­Àí

1.2.1 javaÐéÄâ»ú(1)
¡¡javaÐéÄâ»úÊÇÈí¼þÄ£ÄâµÄ¼ÆËã»ú£¬¿ÉÒÔÔÚÈκδ¦ÀíÆ÷ÉÏ£¨ÎÞÂÛÊÇÔÚ¼ÆËã»úÖл¹ÊÇÔÚÆäËüµç×ÓÉ豸ÖУ©°²È«²¢ÇÒ¼æÈݵÄÖ´Ðб£´æÔÚ.classÎļþÖеÄ×Ö½ÚÂë¡£javaÐéÄâ»úµÄ"»úÆ÷Âë"±£´æÔÚ.classÎļþÖУ¬ÓÐʱҲ¿ÉÒÔ³Æ֮Ϊ×Ö½ÚÂëÎļþ¡£java³ÌÐòµÄ¿çƽ̨Ö÷ÒªÊÇÖ¸×Ö½ÚÂëÎļþ¿ÉÒÔÔÚÈκξßÓÐjavaÐéÄâ»úµÄ¼ÆËã»ú»òÕßµç×ÓÉ ......

JavaÂÛ̳ÊÕ¼¯

×îÇ¿ÁÒÍƼö£­ÎÒµÄjavaÊղؼУ¨ÄÚÓйúÄÚ×îºÃµÄjavaÂÛ̳£©
www.chinajavaworld.com -ÂÛ̳È˺ܶ࣬¸ßÊÖÒ²¶à£¬²»¹ýºÃÏñ¶¼ÔÚDZˮ  
www.cn-java.com -Ò²ºÜ²»´í£¬ÎÄÕºܺ㬵«ÊǾÍÊÇÉÌÒµÐÔŨÁ˵㡣  
www.chinaitlab.com-·Ç³£ÓÐϵͳÐÔ£¬¶øÇÒÍƳöµÄjavaÔ¶³Ì½ÌÓýÊÇÖйú×îÈ«ÃæµÄscjpÔ¶³Ì½ÌÓý¡£ www.huihoo. ......

android ÖÐjava±à³ÌµÄÒâÍâʼþ´¦Àí

     ²»¹ÜÄãÐŲ»ÐÅ£¬¼´Ê¹¶àôÊìÁ·±à³ÌµÄÈËÔ±ÔÚcodingµÄʱºò¶¼»á³öÏÖÒâÏë²»µ½µÄbug¡£ÔÚÉÏƪÎÄÕÂÖÐÎÒÔøÌáµ½£¬bugµÄÔì³ÉÊǶà¸ö·½ÃæµÄ×ۺϽá¹û£¬ÓÐЩbugÊÇ¿ÉÒÔÐÞ¸´µÄ£¬µ«ÊÇÓÐЩÂß¼­ÉϵÄbugÒªÐÞ¸´¿É²»ÊÇÄÇôÈÝÒ×µÄÊÂÇ飬¾ÍÏñÎÒÃÇ×ö´íÁËÒ»¼þÊÂÇ飬Èç¹û²»È¥´Ó¸ù±¾ÉϸÄÕý¾Í»á·¸¸ü´óµÄ´íÎóÒ»Ñù£¬ÓÐʱºòbugÒ²ÊÇÒ»¸ö»ýÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ