java³éÏóÀàºÍ³éÏó·½·¨
³éÏóÀà¾ÍÊDz»ÄÜʹÓÃnew·½·¨½øÐÐʵÀý»¯µÄÀ࣬¼´Ã»ÓоßÌåʵÀý¶ÔÏóµÄÀà¡£³éÏóÀàÓеãÀàËÆ“Ä£°å”µÄ×÷Óã¬Ä¿µÄÊǸù¾ÝÆä¸ñʽÀ´´´½¨ºÍÐÞ¸ÄеÄÀà¡£¶ÔÏó²»ÄÜÓɳéÏóÀàÖ±½Ó´´½¨£¬Ö»¿ÉÒÔͨ¹ý³éÏóÀàÅÉÉú³öеÄ×ÓÀ࣬ÔÙÓÉÆä×ÓÀàÀ´´´½¨¶ÔÏó¡£µ±Ò»¸öÀà±»ÉùÃ÷Ϊ³éÏóÀàʱ£¬ÒªÔÚÕâ¸öÀàÇ°Ãæ¼ÓÉÏÐÞÊηûabstract¡£
ÔÚ³éÏóÀàÖеijÉÔ±·½·¨¿ÉÒÔ°üÀ¨Ò»°ã·½·¨ºÍ³éÏó·½·¨¡£³éÏó·½·¨¾ÍÊÇÒÔabstractÐÞÊεķ½·¨£¬ÕâÖÖ·½·¨Ö»ÉùÃ÷·µ»ØµÄÊý¾ÝÀàÐÍ¡¢·½·¨Ãû³ÆºÍËùÐèµÄ²ÎÊý£¬Ã»Óз½·¨Ì壬Ҳ¾ÍÊÇ˵³éÏó·½·¨Ö»ÐèÒªÉùÃ÷¶ø²»ÐèҪʵÏÖ¡£µ±Ò»¸ö·½·¨Îª³éÏó·½·¨Ê±£¬Òâζ×ÅÕâ¸ö·½·¨±ØÐë±»×ÓÀàµÄ·½·¨ËùÖØÐ´£¬·ñÔòÆä×ÓÀàµÄ¸Ã·½·¨ÈÔÈ»ÊÇabstractµÄ£¬¶øÕâ¸ö×ÓÀàÒ²±ØÐëÊdzéÏóµÄ£¬¼´ÉùÃ÷Ϊabstract¡£
³éÏóÀàÖв»Ò»¶¨°üº¬³éÏó·½·¨£¬µ«Êǰüº¬³éÏó·½·¨µÄÀàÒ»¶¨Òª±»ÉùÃ÷Ϊ³éÏóÀà¡£³éÏóÀà±¾Éí²»¾ß±¸Êµ¼ÊµÄ¹¦ÄÜ£¬Ö»ÄÜÓÃÓÚÅÉÉúÆä×ÓÀà¡£³éÏóÀàÖпÉÒÔ°üº¬¹¹Ôì·½·¨£¬µ«Êǹ¹Ôì·½·¨²»Äܱ»ÉùÃ÷Ϊ³éÏó¡£
³éÏóÀ಻ÄÜÓÃfinalÀ´ÐÞÊΣ¬¼´Ò»¸öÀ಻ÄܼÈÊÇ×îÖÕÀàÓÖÊdzéÏóÀà¡£
abstract²»ÄÜÓëprivate¡¢static¡¢final¡¢native²¢ÁÐÐÞÊÎͬһ¸ö·½·¨¡£
³ÌÐò¾ÙÀý£º
abstract class Animal //¶¨Òå³éÏóÀà
{
String str;
Animal(String s) //¶¨Òå³éÏóÀàµÄÒ»°ã·½·¨
{
str=s;
}
abstract void eat(); //¶¨Òå³éÏó·½·¨
}
class Horse extends Animal //¶¨Òå¼Ì³ÐAnimalµÄ×ÓÀà
{
String str;
Horse(String s)
{
super(s); //µ÷Óø¸ÀàµÄ¹¹Ôì·½·¨
}
void eat() //ÖØÐ´¸¸ÀàµÄ³éÏó·½·¨
{
System.out.println("Âí³Ô²ÝÁÏ£¡");
}
}
class Dog extends Animal
{
String str;
Dog(String s)
{
&nb
Ïà¹ØÎĵµ£º
ǰÑÔ£º
±¾ÎÄÊǶÔJava¼¯ºÏ¿ò¼Ü×öÁËÒ»¸ö¸ÅÀ¨ÐԵĽâ˵£¬Ä¿µÄÊǶÔJava¼¯ºÏ¿ò¼ÜÌåϵÓиö×ÜÌåÈÏʶ£¬Èç¹ûÄãÏëѧϰ¾ßÌåµÄ½Ó¿ÚºÍÀàµÄʹÓ÷½·¨£¬Çë²Î¿´Java APIÎĵµ¡£
Ò»¡¢¸ÅÊö
Êý¾Ý½á¹¹¶Ô³ÌÐòÉè¼ÆÓÐ×ÅÉîÔ¶µÄÓ°Ï죬ÔÚÃæÏò¹ý³ÌµÄCÓïÑÔÖУ¬Êý¾Ý¿â½á¹¹ÓÃstructÀ´ÃèÊö£¬¶øÔÚÃæÏò¶ÔÏóµÄ±à³ÌÖУ¬Êý¾Ý½á¹¹ÊÇÓÃÀàÀ´ÃèÊöµÄ£¬²¢ÇÒ°üº¬ÓжԸÃÊ ......
µÚÒ»£¬Ì¸Ì¸final£¬ finally£¬ finalizeµÄÇø±ð¡£
¡¡¡¡final ÓÃÓÚÉùÃ÷ÊôÐÔ£¬·½·¨ºÍÀ࣬·Ö±ð±íʾÊôÐÔ²»¿É±ä£¬·½·¨²»¿É¸²¸Ç£¬À಻¿É¼Ì³Ð¡£finallyÊÇÒì³£´¦ÀíÓï¾ä½á¹¹µÄÒ»²¿·Ö£¬±íʾ×ÜÊÇÖ´ÐС£finalizeÊÇObjectÀàµÄÒ»¸ö·½·¨£¬ÔÚÀ¬»øÊÕ¼¯Æ÷Ö´ÐеÄʱºò»áµ÷Óñ»»ØÊÕ¶ÔÏóµÄ´Ë·½·¨£¬¿ÉÒÔ¸²¸Ç ......
Java ʵÓþÑé×ܽá --Swing ƪ
ǰÑÔ
±¾ÎÄǰÑÔ²¿·ÖΪÎÒµÄһЩ¸ÐÏ룬Èç¹ûÄãÖ»¶Ô±¾ÎĽéÉÜµÄ Java ʵÓü¼ÇɸÐÐËȤ£¬¿ÉÒÔÌø¹ýǰÑÔÖ±½Ó¿´ÕýÎĵÄÄÚÈÝ¡£
±¾ÎĵÄд×÷¶¯»úÀ´Ô´ÓÚ×î½ü½Ó¸øÈ˼ҰïæдµÄÒ»¸öС³ÌÐò£¬Ö÷ÒªÓÃÓÚ¹ÜÀí·ÖÆÚ¸¶¿îµÄ»õ¿îµÄһϵÁйÜÀí£¬°üÀ¨¹ýÆÚ¿îµÄ¼Í¼£¬¹ýÆÚ¿îÀûÏ¢µÄ¼ÆË㣬ΪÌáǰ¸¶¿îµÄÓû§ÌṩһЩ·µ¿î½ ......
ҪʹÓÃjava caching system£¬ÐèÒªÏÂÃæÕ⼸¸ö°ü£ºjcs.jar£¬concurrent.jar,commons-logging.jar, commons-lang.jar,commons-collection.jarÕ⼸¸ö°ü£¬ÔÚjava¹¤³ÌÀïÃæ£¬
Ê×ÏÈн¨Ò»¸öʹÓÃjcsµÄÅäÖÃÎļþ£ºcache.ccf£¬ÎļþÃû²»Äܸġ£
# DEFAULT CACHE REGION
# sets the default aux value for any non configured ca ......