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

java static µÄʹÓÃ

ÔÚjavaÈç¹ûÒ»¸ö³ÉÔ±±»ÉùÃ÷Ϊstatic£¬Ëü¾ÍÄܹ»ÔÚËüµÄÀàµÄÈκζÔÏó´´½¨Ö®Ç°±»·ÃÎÊ£¬¶ø²»±ØÒýÓÃÈκζÔÏó¡£Äã¿ÉÒÔ½«·½·¨ºÍ±äÁ¿¶¼ÉùÃ÷Ϊstatic¡£static ³ÉÔ±µÄ×î³£¼ûµÄÀý×ÓÊÇmain( ) ¡£ÒòΪÔÚ³ÌÐò¿ªÊ¼Ö´ÐÐʱ±ØÐëµ÷ÓÃmain() £¬ËùÒÔËü±»ÉùÃ÷Ϊstatic¡£ 
ÓÐʱÄãÏ£Íû¶¨ÒåÒ»¸öÀà³ÉÔ±£¬Ê¹ËüµÄʹÓÃÍêÈ«¶ÀÁ¢ÓÚ¸ÃÀàµÄÈκζÔÏó¡£Í¨³£Çé¿öÏ£¬Àà³ÉÔ±±ØÐëͨ¹ýËüµÄÀàµÄ¶ÔÏó·ÃÎÊ£¬µ«ÊÇ¿ÉÒÔ´´½¨ÕâÑùÒ»¸ö³ÉÔ±£¬ËüÄܹ»±»Ëü×Ô¼ºÊ¹Ó㬶ø²»±ØÒýÓÃÌض¨µÄʵÀý¡£ÔÚ³ÉÔ±µÄÉùÃ÷Ç°Ãæ¼ÓÉϹؼü×Östatic(¾²Ì¬µÄ)¾ÍÄÜ´´½¨ÕâÑùµÄ³ÉÔ±¡£
ÉùÃ÷ΪstaticµÄ±äÁ¿ÊµÖÊÉϾÍÊÇÈ«¾Ö±äÁ¿¡£µ±ÉùÃ÷Ò»¸ö¶ÔÏóʱ£¬²¢²»²úÉústatic±äÁ¿µÄ¿½±´£¬¶øÊǸÃÀàËùÓеÄʵÀý±äÁ¿¹²ÓÃͬһ¸östatic±äÁ¿¡£ÉùÃ÷ΪstaticµÄ·½·¨ÓÐÒÔϼ¸ÌõÏÞÖÆ£º
¡ôËüÃǽöÄܵ÷ÓÃÆäËûµÄstatic ·½·¨¡£
¡ôËüÃÇÖ»ÄÜ·ÃÎÊstaticÊý¾Ý¡£
¡ôËüÃDz»ÄÜÒÔÈκη½Ê½ÒýÓÃthis »òsuper
ÄÇstaticÔÚÖØÔØ·½·¨ÖÐÓÖÊÇÈçºÎÄØ£¿
Father.java
public class Father {
 public Father() {
  super();
 }
 /** hide ¹¦ÄܲâÊÔ */
 public static void hide() {
  System.out.println("father hide");
 }
 // over ride
 public void override() {
  System.out.println("father override");
 }
}
Son.java
public class Son extends Father{
 /** hide ¹¦ÄܲâÊÔ */
   public static void hide(){
    System.out.println("son hide");
   }
  
   //override
   public  void override(){
    System.out.println("son override");
   }
  
   //overloading
   public  void override(String a){
    System.out.println("son overloading");
   }
 /**
  * @param args
  */
 public static void main(String[] args) {
  Father son = new Son();
  son.hide();
 
  son.override();
 
  Son son1 = new Son();
  son1.hide();
  son1.override();
  son1.override("aads");
 }
}
½á¹ûÊÇ£º
father hide
son override
son hide
son override
son overloading
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇ


Ïà¹ØÎĵµ£º

java¼¼Êõ

£¨1£© Jbuilder£ºÒ»¸ö¿ÉÊÓµÄJava±à³Ì¹¤¾ß¡£
£¨2£© Eclipse£ºÒ»¸öÇ¿´óµÄJava±à³Ì¹¤¾ß¡£
£¨3£© HSQLDB£ºÊÇ´¿Java¿ª·¢µÄ¹ØϵÐÍÊý¾Ý¿â,²¢ÌṩJDBCÇý¶¯´æÈ¡Êý¾Ý¡£
£¨4£© Mckoi DataBase£ºÊÇÓÉ´¿Java¿ª·¢µÄÊý¾Ý¿â¡£
£¨5£© ArgoUML£ºÊ¹ÓÃJava±àдµÄ¿ªÔ´UML²úÆ·¡£
£¨6£© Columba£ºÊÇ»ùÓÚJavaµÄE-mail¿Í»§¶Ë¡£
£¨7£© FreeCol£º ......

JavaÃÕÌâ6——¿âÃÕÌâ


 
ÃÕÌâ56£º´óÎÊÌâ | ÃÕÌâ57£ºÃû×ÖÀïÓÐʲô£¿ | ÃÕÌâ58£º²úÉúËüµÄÉ¢ÁÐÂë | ÃÕÌâ59£ºÊ²Ã´ÊDz | ÃÕÌâ60£ºÒ»Ðеķ½·¨ | ÃÕÌâ61£ºÈÕÆÚÓÎÏ· | ÃÕÌâ62£ºÃû×ÖÓÎÏ· | 
ÃÕÌâ63£º¸ü¶àͬÑùµÄÎÊÌâ | ÃÕÌâ64£º°´ÓàÊý±à×é | ÃÕÌâ6 ......

JavaѧϰС±Ê¼Ç

1.ÃæÏò¶ÔÏó±à³ÌµÄÓ¢ÎÄËõдÊÇOOP£¬È«³ÆΪ£ºObject Oriented Programming,ÔÚ½øÐÐÃæÏò¶ÔÏó±à³Ìʱ£¬·½·¨ºÍ±äÁ¿¶¼Ð´ÔÚ¾ßÌåµÄ¶ÔÏóÀ²¢¶ÔÆä³ÉÔ±±äÁ¿ºÍ·½·¨ÓкܺõÄÒþ±ÎÐÔ£¬¶ÔÏóÖ®¼äµÄ·ÃÎʶ¼ÊÇͨ¹ýÆä½Ó¿Ú½øÐеġ£
2.¼Ì³ÐÊÇ·¢ÉúÔÚÀàÓëÀàÖ®¼äµÄ£¬ÊÇ×ÓÀ๲Ïí¸¸Àà³ÉÔ±±äÁ¿ºÍ·½·¨µÄÒ»ÖÖģʽ¡£
3.ÃæÏò¹ý³ÌÊÇÖ¸ÔÚÓöµ½ÎÊÌâµÄʱºò£¬Ôõ.ô ......

Java¿ª·¢¹¤¾ßJava IDE GelºÍJcreatorʹÓü¼ÇÉ×ܽá

Ê×ÏȽéÉÜ Ò»¿îСÇɵÄJava IDE - Gel
          ÔÚ¡¶³ÌÐòÔ±¡·ÔÓÖ¾2006ÄêµÚ4ÆÚ¿´µ½½éÉÜһƪ½éÉÜ Free Java IDEµÄÎÄÕ£¬ÀïÃæÌáµ½ÁËGelÕâ¸ö±àÒëÆ÷¡£ÓÚÊÇÉÏÍøËÑÁËһϣ¬¹ûÈ»ÕÒµ½ÁË£¬¹Ù·½ÍøÖ·ÊÇ£ºhttp://memescape.co.uk/gexperts/¡£×îеİ汾ÊÇRC39£¬Ìå»ýºÜС£¬°²×°ÎļþÖ» ......

Java Standard Edition 6 API½éÉÜ

java.applet Ìṩ´´½¨AppletµÄÀàÒÔ¼°ÓÃÓÚAppletºÍAppletÉÏÏÂÎÄ£¨Applet Context£©Í¨ÐŵÄÀà¡£
java.awt °üº¬ËùÓд´½¨Óû§½Ó¿Ú£¨½çÃ棩¡¢»æÖÆͼÏñµÄÀà¡£
java.awt.color ÌṩÑÕÉ«¿Õ¼äµÄÀà
java.awt.datatransfer ÌṩӦÓÃÄÚºÍÓ¦Óü䴫ÊäÊý¾ÝµÄ½Ó¿ÚºÍÀà¡£
java.awt.dnd ÍÏק¹¦ÄÜÖ§³ÖÀà¿â£¨ÍÏקÊÇÔÚÐí¶àGUIÌṩµÄÒ»ÖÖÔÚÁ½¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ