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

¹ØÓÚjavaµÄ¶à̬

ÖØÔØ£º·½·¨ÃûÏàͬ ·µ»ØÀàÐͺͲÎÊýÖÁÉÙÓÐÒ»Ïͬ£¨²ÎÊý°üÀ¨ÀàÐÍ ºÍ ÊýÁ¿£©
ÖØд£º·¢ÉúÔÚ×ÓÀà ·½·¨Ãû ·µ»ØÀàÐÍ ²ÎÊý¶¼Ïàͬ Ö»ÊǰѸ¸ÀàµÄ´Ë·½·¨ÖØÐÂд¶øÒÑ
Ò»Ö±ÒÔÀ´ÎÒ¶ÔFacther f = new Son()ÕâÑùµÄÒýÓñäÁ¿ÒýÓÃ×ÓÀàµÄʵÀý¶¼²»ÊǺܶ®¡£
»¹ÓоÍÊÇÏòÉÏÏòÏÂתÐÍ
È磺Animal animal = new Dog() // ÒýÓñäÁ¿ÒýÓÃÁËÀ´×Ô×ÓÀàµÄʵÀý
      Dog dog = (Dog)animal;     //½«animalÏòÏÂתÐÍ
      Creature creature = (Creature)animal //½«animalÏòÉÏתÐÍ
³ÉÔ±±äÁ¿¡¢¾²Ì¬±äÁ¿, ¾²Ì¬·½·¨°´ÕÕÒýÓñäÁ¿ÉùÃ÷µÄÀàÐ;²Ì¬°ó¶¨£»ÊµÀý·½·¨°´ÕÕÒýÓñäÁ¿ÒýÓõÄʵÀý¶¯Ì¬°ó¶¨¡£  
ÀýÈ磬¶ÔÓÚÒÔÏÂÕâ¶Î´úÂ룺 
Fathers f£½new Sons(); 
System.out.println(“f.var=”+f.var); 
System.out.println(“f.staticVar=”+f.staticVar); 
f.method(); 
f.staticMethod(); 
ÔËÐÐʱ½«»áÊä³öÈçϽá¹û£º 
f.var=FatherVar  // ³ÉÔ±±äÁ¿°´ÕÕÒýÓñäÁ¿£¨f£©µÄÉùÃ÷µÄÀàÐÍ£¨Father£©¾²Ì¬°ó¶¨
f.staticVar=StaticFaterVar  // ¾²Ì¬±äÁ¿°´ÕÕÒýÓñäÁ¿£¨f£©µÄÉùÃ÷µÄÀàÐÍ£¨Father£©¾²Ì¬°ó¶¨
Son method  // ʵÀý·½·¨°´ÕÕÒýÓñäÁ¿£¨f£©µÄÒýÓõÄʵÀý£¨new Sons£¨£©£©¶¯Ì¬°ó¶¨
Static Father method  // ¾²Ì¬·½·¨°´ÕÕÒýÓñäÁ¿£¨f£©µÄÉùÃ÷µÄÀàÐÍ£¨Father£©¾²Ì¬°ó¶¨
class Fathers

String var="FatherVar"; 
static String staticVar="StaticFatherVar"; 
void method(){System.out.println("Father method");} 
static void staticMethod(){System.out.println("Static Father method");} 

class Sons extends Fathers

String var="SonVar"; 
static String staticVar="StaticSonVar"; 
void method(){System.out.println("Son method");} 
static void staticMethod(){System.out.println("Static Son method");} 
}
²Î¿¼£ºhttp://hi.baidu.com/%CE%C4%D3%EA41/blog/item/9330b41f97375dcda68669e5.html


Ïà¹ØÎĵµ£º

javaÖÐÈçºÎʹÓÃamcharts


×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......

¹²ÏíÄÚ´æÔÚJavaÖÐʵÏÖºÍÓ¦ÓÃ

¹²ÏíÄÚ´æÔÚJavaÖÐʵÏÖºÍÓ¦ÓÃ
Õª×Ôhttp://zc4530.javaeye.com/blog/326186 
1¡¢¹²ÏíÄÚ´æ¶ÔÓ¦Ó¦Óÿª·¢µÄÒâÒå
¶ÔÊìÖªUNIXϵͳӦÓÿª·¢µÄ³ÌÐòÔ±À´Ëµ£¬IPC£¨InterProcess Communication£©»úÖÆÊǷdz£ÊìϤµÄ£¬IPC»ù±¾°üÀ¨¹²ÏíÄÚ´æ¡¢ÐźŵƲÙ×÷¡¢ÏûÏ¢¶ÓÁС¢ÐźŴ¦ÀíµÈ²¿·Ö£¬ÊÇ¿ª·¢Ó¦ÓÃÖзdz£ÖØÒªµÄ±Ø²»¿ÉÉٵŤ¾ß¡£ÆäÖй²Ï ......

Java theory and practice

1. Multiply-Thread
Locks offer two primary features: mutual exclusion and visibility. Mutual exclusion means only one thread at a time may hold a given lock, so only one thread at a time will be using the shared data. Visibility is to ensure that changes made to shared data prior to releasing a lo ......

java PatternʹÓÃ

    public static boolean isCheckN(String pInput) {
        String regEx = "^[0-9]+$";
        Pattern p = Pattern.compile(regEx);
        Matcher m = p.matcher(pInput);
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ