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

Java SE Static Inner

/*ÄÚ²¿ÀàʹÓÃʾÀý*/
package demo;
class Outer{
 int outer_i=100;
 static int outer_j=200;
 final int outer_k=300;
 void test(){
  Inner in = new Inner();
  in.display();
 }
 static class Inner{
  void display(){
   System.out.println("display: outer_j = "+/*outer_i*/outer_j);
//   System.out.println("display: outer_k = "+outer_k); //´íÎóÓï¾ä£¬ÔÚ¾²Ì¬ÀàÖв»ÄÜʹÓ÷Ǿ²Ì¬±äÁ¿
  }
 }
}
class InnerClassDemo {
 /**
  * @param args
  */
 public static void main(String[] args) {
  Outer outer=new Outer();
  outer.test();
 }
}
/*Êä³ö½á¹û
display: outer_j = 200
*/
/*ÄÚ²¿ÀàʹÓÃ*/
package demo;
class Outer1{
 private int size=10;
 protected class Inner{
  public void doStuff(){
   System.out.println(++size);
  }
 }
}
public class TestInner {
 public static void main(String[] args) {
  Outer1 outer1=new Outer1();
  Outer1.Inner i=outer1.new Inner();
  i.doStuff();
 }
}


Ïà¹ØÎĵµ£º

Java³£ÓÃËã·¨·ÖÎö

Ò»  ²åÈëÅÅÐò·¨:
˵Ã÷: ÿ´Î½«Ò»¸ö´ýÅÅÐòµÄ¼Ç¼£¬°´Æä¹Ø¼ü×Ö´óС²åÈëµ½Ç°ÃæÒѾ­ÅźÃÐòµÄ×ÓÎļþÖеÄÊʵ±Î»Öã¬Ö±µ½È«²¿¼Ç¼²åÈëÍê³ÉΪֹ¡£ Java´úÂë public class InsertSorter extends Sorter {   /**      * from  ÆðʼλÖà   &# ......

Java ¶àÏß³Ì ÅÀ³æ³ÌÐò£¨spider£©Éè¼ÆÓëʵÏÖ

µ±spider³ÌÐò·ÃÎʵ½Ò»¸öÍøÒ³£¬±ØÐë½øÐÐÒÔϼ¸Ïî»ù±¾´¦Àí£º³éÈ¡ÍøÒ³Öаüº¬µÄÎı¾;³éÈ¡ÍøÒ³Öаüº¬µÄURL£¬²¢½«ÆäÇø·ÖÎªÍøÒ³Öаüº¬µÄÎı¾£»³éÈ¡ÍøÒ³Öаüº¬µÄURL£¬²¢½«ÆäÇø·ÖÎªÍøÕ¾ÄÚURL»òÍøÕ¾ÍâURL¡£
2.2¸÷Ö÷Òª¹¦ÄÜ Ä£¿é£¨ÀࣩÉè¼Æ
2.2.1 spiderÀà
    ¸ÃÀàΪÖ÷À࣬¼Ì³Ð×ÔÏß³ÌÀà¡£Ëü±¾Ê²¢²»×ö»ñÈ¡ÍøÒ³µÄ¾ßÌå ......

javaµÄÔ­×Ó²Ù×÷ºÍvolatile

Ô­×Ó²Ù×÷
Ëùνԭ×Ó²Ù×÷,¾ÍÊÇ"²»¿ÉÖжϵÄÒ»¸ö»òһϵÁвÙ×÷" , ÔÚÈ·ÈÏÒ»¸ö²Ù×÷ÊÇÔ­×ÓµÄÇé¿öÏ£¬¶àÏ̻߳·¾³ÀïÃæ£¬ÎÒÃÇ¿ÉÒÔ±ÜÃâ½ö½öΪ±£»¤Õâ¸ö²Ù×÷ ÔÚÍâΧ¼ÓÉÏÐÔÄܰº¹óµÄËø£¬ÉõÖÁ½èÖúÓÚÔ­×Ó²Ù×÷£¬ÎÒÃÇ¿ÉÒÔʵÏÖ»¥³âËø¡£ ¹ØÓÚjavaÖеÄÔ­×ÓÐÔ
Ô­×ÓÐÔ¿ÉÒÔÓ¦ÓÃÓÚ³ýlongºÍdoubleÖ®ÍâµÄËùÓлù±¾ÀàÐÍÖ®Éϵġ°¼òµ¥²Ù×÷¡±¡£¶Ô ......

java±ÊÊÔ

1.MVCµÄ¸÷¸ö²¿·Ö¶¼ÓÐÄÇЩ¼¼ÊõÀ´ÊµÏÖ?ÈçºÎʵÏÖ?
´ð£ºMVCÊÇModel£­View£­ControllerµÄ¼òд¡£"Model" ´ú±íµÄÊÇÓ¦ÓõÄÒµÎñÂß¼­£¨Í¨¹ýJavaBean£¬EJB×é¼þʵÏÖ£©£¬ "View" ÊÇÓ¦ÓõıíÊ¾Ãæ£¨ÓÉJSPÒ³Ãæ²úÉú£©£¬"Controller" ÊÇÌṩӦÓõĴ¦Àí¹ý³Ì¿ØÖÆ£¨Ò»°ãÊÇÒ»¸öServlet£©£¬Í¨¹ýÕâÖÖÉè¼ÆÄ£ÐͰÑÓ¦ÓÃÂß¼­£¬´¦Àí¹ý³ÌºÍÏÔʾÂß¼­·Ö³É²» ......

java±ÊÊÔ

1.ʲôÊǶÔÏó£¬Ê²Ã´ÊÇÃæÏò¶ÔÏó£¬Ê²Ã´ÊÇÀࣿ
ÏÖʵÊÀ½çÖÐÈκÎʵÌå¶¼¿ÉÒÔ¿´×÷ÊǶÔÏó¡£ËûÃÇÓÐÁ½ÖÖÌØÕ÷£ºËûÃǶ¼ÓµÓÐ״̬ÓëÐÐΪ¡£Èí¼þÖеĶÔÏóÓÐ×Ô¼ºµÄÊôÐÔºÍÄܹ»Ö´ÐеIJÙ×÷¡£
ËùÎ½ÃæÏò¶ÔÏó¾ÍÊÇ»ùÓÚ¶ÔÏó¸ÅÄÒÔ¶ÔÏóΪÖÐÐÄ£¬ÒÔÀàºÍ¼Ì³ÐΪ¹¹Ôì»úÖÆ£¬À´ÈÏʶ¡¢Àí½â¡¢¿Ì»­¿Í¹ÛÊÀ½çºÍÉè¼Æ¡¢¹¹½¨ÏàÓ¦µÄÈí¼þϵͳ¡£
Àà¾ÍÊǶÔÒ»¸öÊÂÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ