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

JAVA¹Ø¼ü×ÖÏê½â

JAVA¹Ø¼ü×ÖÏê½â
1 finalÊý¾Ý£º
   1>¶ÔÓÚ»ù±¾ÀàÐÍÇ°¼ÓÒÔfinalÐÞÊΣ¬±íʾ±»ÐÞÊεıäÁ¿Îª³£Êý£¬²»¿ÉÒÔÐ޸ġ£Ò»¸ö¼ÈÊÇstaticÓÐÊÇfinalµÄ×ֶαíʾֻռ¾ÝÒ»¶Î²»ÄܸıäµÄ´æ´¢¿Õ¼ä¡£
   2>finalÓÃÓÚ¶ÔÏóÓ¦ÓÃʱ£¬finalʹӦÓú㶨²»±ä¡£Ò»µ©ÒýÓñ»³õʼ»¯Ö¸ÏòÒ»¸ö¶ÔÏ󣬾ÍÎÞ·¨ÔÙ°ÑËüÖ¸ÏòÁíÒ»¸ö¶ÔÏó¡£
   3>final·½·¨:Ò»ÊÇ°Ñ·½·¨Ëø¶¨£¬ÒÔ·ÀÖ¹¼Ì³ÐÀàÐÞ¸ÄËüµÄº¬Ò壬¶þÊÇÈ·±£¼Ì³ÐÖÐʹ·½·¨ÐÐΪ±£³Ö²»±ä£¬²¢ÇÒ²»»á±»¸²¸Ç¡£ÀàÖÐËùÓеÄprivate·½·¨¶¼ÒþʽµØÖ¸¶¨ÎªÊÇfinal¡£
   4>final²ÎÊý£º¶ÔÓÚ»ù±¾ÀàÐ͵ıäÁ¿£¬ÕâÑù×ö²¢Ã»ÓÐʲôʵ¼ÊÒâÒ壬ÒòΪ»ù±¾ÀàÐ͵ıäÁ¿ÔÚµ÷Ó÷½·¨Ê±ÊÇ´«Öµ£¬Ò²¾ÍÊÇ˵Äã¿ÉÒÔÔÚ·½·¨Öиü¸ÄÕâ¸ö²ÎÊý±äÁ¿¶ø²»»áÓ°Ïìµ½µ÷ÓÃÓï¾ä£¬È»¶ø¶ÔÓÚ¶ÔÏó±äÁ¿£¬È´ÏԵúÜʵÓã¬ÒÔΪ¶ÔÏó±äÁ¿ÔÚ´«µÝʱÊÇ´«µÝÆäÒýÓã¬ÕâÑùÄãÔÚ·½·¨ÖжԶÔÏó±äÁ¿µÄÐÞ¸ÄÒ²»áÓ°Ïìµ½µ÷ÓÃÓï¾äµÄ¶ÔÏó±äÁ¿£¬µ±ÄãÔÚ·½·¨Öв»ÐèÒª¸Ä±ä×÷Ϊ²ÎÊýµÄ±äÁ¿Ê±£¬Ã÷ȷʹÓÃfinal½øÐÐÉùÃ÷£¬»á·ÀÖ¹ÄãÎÞÒâµÄÐ޸ĶøÓ°Ïìµ½µ÷Ó÷½·¨¡£
   5>finalÀࣺµ±½«Ä³¸öÀàµÄÕûÌ嶨ÒåΪfinalʱ£¬¾Í±íÃ÷Á˸ÃÀ಻ÔÊÐí±»¼Ì³Ð¡£
 
2 this ºÍsuper
   1>ÔÚÄãµÄ·½·¨ÖеÄij¸öÐ̲ÎÃûÓ뵱ǰ¶ÔÏóµÄij¸ö³ÉÔ±ÓÐÏàͬµÄÃû×Ö£¬ÕâʱΪÁ˲»ÖÁÓÚ»ìÏý£¬Äã±ãÒªÃ÷ȷʹÓÃthis¹Ø¼ü×ÖÀ´Ö¸Ã÷ÄãҪʹÓÃij¸ö³ÉÔ±£¬Ê¹Ó÷½·¨ÊÇthis.³ÉÔ±Ãû£¬¶ø²»´øthisµÄÄǸö±ãÊÇÐ̲Ρ£ÁíÍ⣬»¹¿ÉÒÔÓÃthis.·½·¨ÃûÀ´ÒýÓõ±Ç°¶ÔÏóµÄij¸ö·½·¨£¬µ«Õâʱthis¾Í²»ÊDZØÐëµÄÁË£¬Äã¿ÉÒÔÖ±½ÓÓ÷½·¨ÃûÀ´·ÃÎÊÄǸö·½·¨¡£
   2>µ±¸¸ÀàµÄ·½·¨±»ÖØдºó¿ÉÒÔÓÃsuperÀ´µ÷Óø¸ÀàµÄ·½·¨¡£Èç¹û¸¸ÀàµÄ·½·¨¿ÉÒÔ±»×ÓÀàµ÷Óã¬ÄÇÄã¿ÉÒÔÏóʹÓÃthisÒ»ÑùʹÓÃËü£¬ÓÃsuper.¸¸ÀàÖеijÉÔ±ÃûµÄ·½Ê½À´µ÷Óá£
   3>superºÍthisÖ±½ÓÔÚÆäºó¸úÉÏÊʵ±µÄ²ÎÊý£¬Òò´ËËüµÄÒâÒå¾ÍÓÐÁ˱仯¡£superºó¼Ó²ÎÊýµÄÊÇÓÃÀ´µ÷Óø¸ÀàÖоßÓÐÏàͬÐÎʽµÄ¹¹Ô캯Êý£¬thisºó¼Ó²ÎÊýÔòµ÷ÓõÄÊǵ±Ç°¾ßÓÐÏàͬ²ÎÊýµÄ¹¹Ô캯Êý¡£
   4> thisͨ³£Ö¸´úµ±Ç°¶ÔÏó£¬super ͨ³£Ö¸´ø¸¸Àà¡£
3 static
   1>ͨ³£ÔÚÒ»¸öÀàÖж¨ÒåÒ»¸ö·½·¨Îªstatic£¬¾ÍÊÇ˵ÎÞÐë±¾ÀàµÄ¶ÔÏó¾Í¿ÉÒÔÖ±½Óµ÷Óá£
   2>¾²Ì¬±äÁ¿ºÍ¾²Ì¬·½·¨ÀàËÆ¡£ËùÓдËÀàʵÀý¹²Ïí´Ë¾²Ì¬±äÁ¿£¬Ò²¾ÍÊÇ˵Àà×°ÔØʱ£¬Ö»·ÖÅäÒ»¿é´æ´¢¿Õ¼ä£¬ËùÓдËÀàµÄ¶ÔÏ󶼿ÉÒԲٿش˿é´æ´¢¿Õ¼ä£¬µ±È»¶ÔÓÚfinal¾ÍÁíµ±±ðÂÛÁË¡£
   3>static¶¨Ò


Ïà¹ØÎĵµ£º

JavaÏß³Ìͬ²½Ê¾Àý

ÎÄÕÂÓÃʵÀý´úÂëչʾÁËJavaÖжàÏ̷߳ÃÎʹ²Ïí×ÊÔ´
ʱÏß³Ìͬ²½
µÄÖØÒªÐÔ¡£
·Ö±ðͨ¹ýÔÚÁ½¸öÏß³ÌÖÐͬʱ·ÃÎÊ(µ÷ÓÃget_id*·½·¨)¾­¹ýͬ²½´¦Àí(lock¼°Synchronized)µÄ¹²Ïí×ÊÔ´(tmp)¼°Î´¾­¹ýͬ²½´¦ÀíµÄ¹²Ïí×ÊÔ´(tmp)À´ËµÃ÷ͬ²½´¦ÀíµÄµÄ×÷Óá£
mainÖзÖÁ½²¿·Ö:
1£©Ç°°ë²¿·Ö£¬non-synchronization²¿·ÖÓÃÀ´²âÊÔûÓÐ×öͬ²½´¦ÀíµÄ´úÂë ......

Java:¼¯ºÏÀàÐÔÄÜ·ÖÎö¡¾×ª¡¿

1.Java ¼¯ºÏ¿ò¼Üͼ
¡¡¡¡-¼¯ºÏ½Ó¿Ú£º6¸ö½Ó¿Ú£¨¶ÌÐéÏß±íʾ£©£¬±íʾ²»Í¬¼¯ºÏÀàÐÍ£¬ÊǼ¯ºÏ¿ò¼ÜµÄ»ù´¡¡£
¡¡¡¡-³éÏóÀࣺ5¸ö³éÏóÀࣨ³¤ÐéÏß±íʾ£©£¬¶Ô¼¯ºÏ½Ó¿ÚµÄ²¿·ÖʵÏÖ¡£¿ÉÀ©Õ¹Îª×Ô¶¨Ò弯ºÏÀà¡£
¡¡¡¡-ʵÏÖÀࣺ8¸öʵÏÖÀࣨʵÏß±íʾ£©£¬¶Ô½Ó¿ÚµÄ¾ßÌåʵÏÖ¡£
¡¡¡¡2.JavaÈÝÆ÷Àà½éÉÜ
¡¡¡¡¢Ù JavaÈÝÆ÷À඼¿ÉÒÔ×Ô¶¯µØµ÷Õû×Ô¼ºµÄ³ß´ ......

ͨ¹ýJava¼¸ÐдúÂë½ØÈ¡ÆÁÄ»

ͨ¹ýjava.awt.RobotµÄcreateScreenCapture½ØÆÁ¡£
    public static void captureScreen(String fileName) throws Exception {
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Rectangle screenRectangle = new Rectangle(screenSize);
& ......

javaÔõôʵÏÖ·ÖÒ³

1.PaginationTable.java
package com.sinoest.train.common;
import java.util.List;
/**
* ·ÖÒ³±í
* @author ÀîÒ×烜-ÐÞ¸Ä
* 2009-6-17
*/
public class PaginationTable {
private List<?> entryList;//> Êý¾Ý
private int totalNumOfRows;// ×ÜÐÐÊý
private int rowsPerPage = 10;// ......

java ʹÓÃÏà¶Ô·¾¶¶ÁÈ¡Îļþ

http://www.blogjava.net/flysky19/articles/93492.html
1.java project»·¾³£¬Ê¹ÓÃjava.ioÓÃÏà¶Ô·¾¶¶ÁÈ¡ÎļþµÄÀý×Ó£º
 *Ŀ¼½á¹¹£º
  DecisionTree
            |___src
             ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ