Ïêϸ½âÎöJavaÖгéÏóÀàºÍ½Ó¿ÚµÄÇø±ð
ÔÚJava
ÓïÑÔÖУ¬ abstract class ºÍinterface
ÊÇÖ§³Ö³éÏóÀà
¶¨
ÒåµÄÁ½ÖÖ»úÖÆ¡£ÕýÊÇÓÉÓÚÕâÁ½ÖÖ»úÖƵĴæÔÚ£¬²Å¸³ÓèÁËJavaÇ¿´óµÄ ÃæÏò¶ÔÏóÄÜÁ¦¡£abstract
classºÍinterfaceÖ®¼äÔÚ¶ÔÓÚ³éÏóÀඨÒåµÄÖ§³Ö·½Ãæ¾ßÓкܴóµÄÏàËÆÐÔ£¬ÉõÖÁ¿ÉÒÔÏ໥Ìæ»»£¬Òò´ËºÜ¶à¿ª·¢ÕßÔÚ½ø
ÐгéÏóÀඨÒåʱ¶ÔÓÚabstract
classºÍinterfaceµÄÑ¡ÔñÏԵñȽÏËæÒâ¡£Æäʵ£¬Á½ÕßÖ®¼ä»¹ÊÇÓкܴóµÄÇø±ðµÄ£¬¶ÔÓÚËüÃǵÄÑ¡ÔñÉõÖÁ·´Ó³³ö¶Ô
ÓÚÎÊÌâÁìÓò±¾ÖʵÄÀí½â¡¢¶ÔÓÚÉè¼ÆÒâͼµÄÀí½âÊÇ·ñÕýÈ·¡¢ºÏÀí¡£±¾ÎĽ«¶ÔËüÃÇÖ®¼äµÄÇø±ð½øÐÐÒ»·¬ÆÊÎö£¬ÊÔͼ¸ø¿ª·¢ÕßÌṩһ¸öÔÚ¶þÕßÖ®¼ä½øÐÐÑ¡ÔñµÄÒÀ¾Ý¡£
¡¡¡¡Àí½â³éÏóÀà
¡¡
¡¡abstract classºÍinterfaceÔÚJavaÓïÑÔÖж¼ÊÇÓÃÀ´½øÐгéÏóÀࣨ±¾ÎÄ ÖеijéÏóÀಢ·Ç´Óabstract
class·Òë¶øÀ´£¬Ëü±íʾµÄÊÇÒ»¸ö³éÏóÌ壬¶øabstract classΪJavaÓïÑÔÖÐÓÃÓÚ¶¨Òå³éÏóÀàµÄÒ»ÖÖ·½·¨£¬
Çë¶ÁÕß×¢ÒâÇø·Ö£©¶¨ÒåµÄ£¬ÄÇôʲôÊdzéÏóÀ࣬ʹÓóéÏóÀàÄÜΪÎÒÃÇ´øÀ´Ê²Ã´ºÃ´¦ÄØ£¿
¡¡¡¡ÔÚ
ÃæÏò¶ÔÏóµÄ¸ÅÄîÖУ¬ÎÒÃÇÖªµÀËùÓеĶÔÏó¶¼ÊÇͨ¹ýÀàÀ´Ãè»æµÄ£¬µ«ÊÇ·´¹ýÀ´È´²»ÊÇÕâÑù¡£²¢²»ÊÇ
ËùÓеÄÀ඼ÊÇÓÃÀ´Ãè»æ¶ÔÏóµÄ£¬Èç¹ûÒ»¸öÀàÖÐûÓаüº¬×ã¹»µÄÐÅÏ¢À´Ãè»æÒ»¸ö¾ßÌåµÄ¶ÔÏó£¬ÕâÑùµÄÀà¾ÍÊdzéÏóÀà¡£³éÏóÀàÍùÍùÓÃÀ´±íÕ÷ÎÒÃÇÔÚ¶ÔÎÊÌâÁìÓò½øÐзÖÎö¡¢
Éè¼ÆÖеóöµÄ³éÏó¸ÅÄÊǶÔһϵÁп´ÉÏÈ¥²»Í¬£¬µ«ÊDZ¾ÖÊÉÏÏàͬµÄ¾ßÌå¸ÅÄîµÄ³éÏó¡£±ÈÈ磺Èç¹ûÎÒÃǽøÐÐÒ»¸öͼÐαà¼Èí¼þµÄ¿ª·¢£¬¾Í»á·¢ÏÖÎÊÌâÁìÓò´æÔÚ×ÅÔ²¡¢
Èý½ÇÐÎÕâÑùһЩ¾ßÌå¸ÅÄËüÃÇÊDz»Í¬µÄ£¬µ«ÊÇËüÃÇÓÖ¶¼ÊôÓÚÐÎ×´ÕâÑùÒ»¸ö¸ÅÄÐÎ×´Õâ¸ö¸ÅÄîÔÚÎÊÌâÁìÓòÊDz»´æÔڵģ¬Ëü¾ÍÊÇÒ»¸ö³éÏó¸ÅÄî¡£ÕýÊÇÒòΪ³éÏóµÄ¸ÅÄî
ÔÚÎÊÌâÁìÓòûÓжÔÓ¦µÄ¾ßÌå¸ÅÄËùÒÔÓÃÒÔ±íÕ÷³éÏó¸ÅÄîµÄ³éÏóÀàÊDz»Äܹ»ÊµÀý»¯µÄ¡£
¡¡¡¡ÔÚÃæÏò¶ÔÏóÁìÓò£¬³éÏóÀàÖ÷ÒªÓÃÀ´½øÐÐÀàÐÍÒþ²Ø¡£
ÎÒÃÇ¿ÉÒÔ¹¹Ôì³öÒ»¸ö¹Ì¶¨µÄÒ»×éÐÐΪµÄ³éÏóÃè
Êö£¬µ«ÊÇÕâ×éÐÐΪȴÄܹ»ÓÐÈÎÒâ¸ö¿ÉÄܵľßÌåʵÏÖ·½Ê½¡£Õâ¸ö³éÏóÃèÊö¾ÍÊdzéÏóÀ࣬¶øÕâÒ»×éÈÎÒâ¸ö¿ÉÄܵľßÌåʵÏÖÔò±íÏÖΪËùÓпÉÄܵÄÅÉÉúÀࡣģ¿é¿ÉÒÔ²Ù×÷Ò»¸ö
³éÏóÌå¡£ÓÉÓÚÄ£¿éÒÀÀµÓÚÒ»¸ö¹Ì¶¨µÄ³éÏóÌ壬Òò´ËËü¿ÉÒÔÊDz»ÔÊÐíÐ޸ĵģ»Í¬Ê±£¬Í¨¹ý´ÓÕâ¸ö³éÏóÌåÅÉÉú£¬Ò²¿ÉÀ©Õ¹´ËÄ£¿éµÄÐÐΪ¹¦ÄÜ¡£ÊìϤOCPµÄ¶ÁÕßÒ»¶¨Öª
µÀ£¬ÎªÁËÄܹ»ÊµÏÖÃæÏò¶ÔÏóÉè¼ÆµÄÒ»¸ö×îºËÐĵÄÔÔòOCP(Open-Closed Principle)£¬³éÏóÀàÊÇÆäÖеĹؼüËùÔÚ¡£
¡¡¡¡´ÓÓï·¨¶¨Òå²ãÃæ¿´abstract class ºÍ interface
¡¡¡¡ÔÚÓï·¨²ãÃ棬JavaÓïÑÔ¶ÔÓÚabstract classºÍinterface¸ø³öÁ˲»Í¬
Ïà¹ØÎĵµ£º
Çë²Î¼ûÉÏһƪÎÄÕ£¬µÇ¼MSNÐÒé
¾ßÌåJavaʵÏÖ:
ÃüÁîÐòÁУº<<´ú±í·¢ËÍ,>>´ú±í½á¹û
1.Á¬½ÓDS(Dispatcher Server)£¬µÃµ½NS(Notification Server)
<<VER 1 MSNP18 CVR0
>>VER 1 MSNP18
<<CVR 2 0x0804 winnt 5.1 i386 MSNMSGR 14.0.8089.0726 msmsgs yourAccount
>>CVR 2 14.0.8089 ......
ÓÉÓÚ¹«Ë¾ÒµÎñÔö³¤£¬ÏÖ¼±ÐèÕÐƸ·ûºÏÈçÏÂÌõ¼þJAVA¸ß¼¶Èí¼þ¹¤³Ìʦ Èô¸ÉÃû
1¡¢¾ßÓÐÁ¼ºÃµÄjava¼¼Êõ֪ʶºÍ¾Ñ飻
2¡¢¾ß±¸Á¼ºÃµÄ½â¾öÎÊÌâµÄÄÜÁ¦ÒÔ¼°³öÉ«µÄÍŶӺÏ×÷ÄÜÁ¦£»
3¡¢ÊìϤJ2EE¼Ü¹¹ºÍ¿ª·¢Ä£Ê½£¬ÊìϤMVCÉè¼Æģʽ£»
4¡¢ÊìϤhibernate¡¢struts2¡¢spring£»
5¡¢ÄÜ°´Õչ淶µÄÈí¼þ¿ª·¢Á÷³Ì£¬Íê³ÉÈí¼þµÄÐèÇó¡¢Éè¼Æ¡¢±àÂëº ......
try {
String source = "xxx.xls";
InputStream is = new FileInputStream(source);
Workbook rwb = Workbook.getWorkbook(is);
Sheet sheet = rwb.getSheet(0);
for (int i = 1; i < sheet.getRows(); i++) {
for (int j = 1; j < sheet.getColumns(); j++) {
//»ñÈ¡Ö¸¶¨µ¥Ôª¸ñ ......
JavaÁìÓòµÄ¼´Ê±Í¨ÐŵĽâ¾ö·½°¸¿ÉÒÔ¿¼ÂÇopenfire+spark+smack¡£µ±È»Ò²ÓÐÆäËûµÄÑ¡Ôñ¡£
¡¡¡¡OpenfireÊÇ»ùÓÚJabberÐÒé(XMPP)ʵÏֵļ´Ê±Í¨ÐÅ·þÎñÆ÷¶Ë°æ±¾£¬Ä¿Ç°½¨ÒéʹÓÃ3.6.4°æ±¾£¬Õâ¸ö°æ±¾Êǵ±Ç°×îеİ汾£¬¶øÇÒÍøÉÏ¿ÉÒÔÕÒµ½ÏÂÔصÄÔ´´úÂë¡£
¡¡¡¡¼´Ê±Í¨ÐÅ¿Í»§¶Ë¿ÉʹÓÃspark2.5.8,Õâ¸ö°æ±¾ÊÇÄ¿Ç°×îеÄrelease°æ±¾£¬¾¹ý²âÊÔ· ......
ÖØдµÄÖ÷ÒªÓŵãÊÇÄܹ»¶¨Òåij¸ö×ÓÀàÌØÓеÄÌØÕ÷:
Èç:
public class Father
{
public void speak()
&nb ......