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

c++ÖÐÄÜ·ñʹÓÃinterface£¨Èçjava£©ÄÇÑùµÄ¹¦ÄÜ?

ÎÊ:
      È·ÈÏÒ»ÏÂc++Öв»ÄÜʹÓÃinterface£¨Èçjava£©ÄÇÑùµÄ¹¦ÄÜ°Ñ
ÎÒÈÏΪÊDz»Äܵģ¬×¢ÒâÎÒ˵µÄÊÇinterface£¨ÓÃÓÚjava¶àÖؼ̳еÄÄǸö£¬²»ÊÇÒ»°ãÒâÒåµÄ½Ó¿Ú£©
ÎÒ¾õµÃÊÇûÓеģ¬µ«ÊÇÍøÉÏËÑË÷˵ʲôµÄ¶¼ÓжøÇÒÈË»¹²»ÉÙ…… ËùÒÔÏ£Íû´ó¼ÒÄܸøÎÒÒ»¸öÃ÷È·µÄ´ð¸´ºÃô£¿×îºÃÄÜ»¹ÓÐһЩ½âÊÍÀ² ^_^
´ð:
      Ïë±È½ÏÓïÑÔ£¬ ÇëÊ×ÏÈÊìϤÁ½ÃÅÓïÑÔ¡£
javaµÄinterfaceºÍµ¥¼Ì³Ð¶àʵÏÖÊÇÒ»ÖÖÏÞÖÆ£¬¶ø·ÇÔöÇ¿¡£
interface½«ÀàÏÞÖÆΪֻ´ø·½·¨ÆõÔ¼£¬²»´øÈκÎʵÏÖ¡£
µ¥¼Ì³Ð¶àʵÏÖÏÞÖƵÄÊÇÓɶà¸ö´øʵÏÖµÄÀà¼Ì³Ð——¶àÖؼ̳С£
--------------------------------------------------------------------------------
ÒòΪjavaÌṩµÄinterfaceÊÇÏÞÖÆ¡£
ËùÒÔÔÚC++ÖУ¬ÍêÈ«¿ÉÒÔͨ¹ý×ÔÎÒÏÞÖÆ×öµ½ÏàͬµÄ¹¦ÄÜ¡£
struct interface1 {
  virtual ~I1();
  virtual void f11() = 0;
  virtual void f12() = 0;
  // ...
};
struct interface2 {
  virtual ~I2();
  virtual void f21() = 0;
  virtual void f22() = 0;
  // ...
};
/* interface more */
class base { /**/ };
class derived : public base, public interface1,public interface2 /* interface more */
{
   void f11() { /* implement */ }
   void f21() { /* implement */ }
   /* more implement */
};
Â¥Ö÷¾õµÃÕâ¸úÄãÏëÏóÖÐjavaµÄµ¥¼Ì³Ð¶àʵÏÖÓÐʲôÇø±ðô£¿
--------------------------------------------------------------------------------
ͬʱ£¬ÒòΪjavaµÄµ¥¼Ì³Ð¶àʵÏÖÒ²ÊÇÒ»ÖÖÏÞÖÆ£¬
ËùÒÔjavaÀïûÓÐÕæÕýµÄ¶àÖؼ̳С£
C++²ÅÓµÓÐÕæÕýµÄ¶àÖؼ̳С£
--------------------------------------------------------------------------------
ok£¬ÎÒÖªµÀÄãÓÖÏë˵£¬C++µÄÕâÖÖÄÜÁ¦È·Êµ»á±»Óõ½Ã´£¿ ·ñÔòjavaΪʲô»á±»ÏÞÖÆ¡£
ÎÒ¸æËßÄ㣬 ÕâÏÞÖÆÊÇjames goslingÄǸöÆ«Ö´¿ñ¸ã³öÀ´µÄ¡£
Ëû¾õµÃ²»ºÃµÄ¶«Î÷£¬Ëû¾ÍÒ»¶¨ÒªÔÚÓïÑÔÖÐÈ¥µô£¬²»¸ø³ÌÐòÔ±ÁôÈκÎÓàµØ¡£
ËûÉõÖÁÏë°ÑjavaµÄextends¶¼¸øÈ¥µô£¨ËµÁË£¬Ëû¾ÍÊÇһƫִ¿ñ£©¡£Èç¹ûÕæÕâÑù£¬Â¥Ö÷»¹»áÓÃjavaô£¿
×ÜÖ®£¬Ð´java´úÂë¾ÍÓб»ÓïÑÔÉè¼ÆÕßqiang jianµÄ¸Ð¾õ¡£ ²»¹ÜÊÇgoto¡¢switch µÄbreak£¬»¹ÊÇchecked exception¡£
¶øÇÒ£¬¶à¼Ì³ÐÈ·Ê


Ïà¹ØÎĵµ£º

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¼ÓÃÜÓë½âÃÜ£¨by quqi99£©

                                        Java¼ÓÃÜÓë½âÃÜ£¨by quqi99£©
×÷ÕߣºÕÅ»ª ·¢±íÓÚ£º2009-12-31
°æ鬃 ......

[תÔØ] javaÍêÃÀ¾­µä¶ÁÊé±Ê¼Ç

                                                   ......

JavaÖеÄÊó±êºÍ¼üÅÌʼþ


1¡¢Ê¹ÓÃMouseListener½è¿Ú´¦ÀíÊó±êʼþ
Êó±êʼþÓÐ5ÖÖ£º°´ÏÂÊó±ê¼ü£¬ÊÍ·ÅÊó±ê¼ü£¬µã»÷Êó±ê¼ü£¬Êó±ê½øÈëºÍÊó±êÍ˳ö
Êó±êʼþÀàÐÍÊÇMouseEvent£¬Ö÷Òª·½·¨ÓУº
getX(),getY() »ñÈ¡Êó±êλÖÃ
getModifiers() »ñÈ¡Êó±ê×ó¼ü»òÕßÓÒ¼ü
getClickCount() »ñÈ¡Êó±ê±»µã»÷µÄ´ÎÊý
getSource() »ñÈ¡Êó±ê·¢ÉúµÄʼþÔ´
ʼþÔ ......

±Ø±¸µÄ Java ²Î¿¼×ÊÔ´Áбí

×Ô java ƽ̨´Ó 1995 Äê×÷Ϊһ¸öÕûÌåÒýÈë±à³ÌÉçÇø¿ªÊ¼£¬ËüµÄ·¢Õ¹ÒѾ­Ô¶Ô¶³¬³öÁËÔçÆÚ java ר¼ÒºÍÍƽéÕßËùÉèÏëµÄ“applet ÎÞ´¦²»ÔÚ”ÕâÒ»Ô¶¾°¡£Ïà·´£¬java ÊÀ½ç³öÏÖÁË Swing¡¢Óë servlet ½áºÏ£¬´Ó¶ø·¢Õ¹Îª J2EE¡¢³öÏÖÁË EJB¡¢³¬Ô½ÁË Spring ºÍ Hibernate¡¢Ìí¼ÓÁË·ºÐÍ£¬±äµÃÔ½À´Ô½¾ßÓж¯Ì¬ÐÔ£¬È»ºóʵÏÖÁ˺¯Êý»¯£¬ÔÚ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ