javaÖеÄmainÄãÖªµÀÂð
Èç¹ûÄãÈ¥ÃæÊÔµÄʱºò£¬ÃæÊÔ¹Ù¿¼Ä㣬ΪʲôҪÔÚjavaÖеÄmain·½·¨Ç°¼Ópublic static voidÕâЩÐÞÊηû£¬ÄãÖªµÀÈçºÎÈ¥»Ø´ðÂð£¿ÏÂÃæÎÒΪ´ó¼Ò½²½âһϰɣ¡Èç¹ûÓÐʲôȱ©µÄ»°£¡»¶Ó´ó¼ÒµÄÖ¸µã£¡
Ê×ÏÈ£¬ÎªÊ²Ã´ÒªÓÃpublic£º
ÒòΪÔÚÔËÐгÌÐòʱ£¬jvmÒªµ÷ÓÃmain·½·¨£¬µ«ÎÒÃǶ¼Ó¦¸ÃÖªµÀjvmÊÇÒ»¸öÈí¼þ²¢²»ÊÇÓ²¼þ£¬²¢ÇÒËüÓëmain·½·¨ËùÔڵİüÊDz»Í¬µÄ£¬ËùÒÔjvmÒªµ÷ÓÃmain·½·¨Ê±£¬main·½·¨¾Í±ØÐëÉùÃ÷Ϊpublic£»·ñÔòjvm¾ÍÎÞ·¨ÕÒµ½ºÍµ÷ÓÃmain·½·¨£¬´Ëʱ³ÌÐò¾ÍÎÞ·¨ÔËÐС£
µÚ¶þ£¬ÎªÊ²Ã´ÒªÓÃstatic£º
ÒòΪÈç¹û²»ÊÊÓÃstatic£¬¾ÍÖ»ÄÜ´´ÔìÒ»¸öʵÀýÈ¥µ÷ÓÃmain·½·¨£¬µ«ÊÇjvm²¢²»ÖªµÀÈçºÎÈ¥´´ÔìÒ»¸öʵÀý£¬¶øÄãÒª´´ÔìÒ»¸öʵÀýʱ£¬±ØÐëÒªÔÚmain·½·¨ÀïͷʹÓÃnewÕâ¸ö¹Ø¼ü×Ö£¬µ«´ËʱjvmÎÞ·¨µ÷ÓÃmain·½·¨£¬ËùÒÔ¾ÍÎÞ·¨´´ÔìÒ»¸öʵÀýÈ¥µ÷ÓÃmain·½·¨£¬ËùÒÔmain·½·¨±ØÐëÉùÃ÷Ϊstatic¡£
µÚÈý£¬ÎªÊ²Ã´ÒªÓÃvoid£º
1¡¢main·½·¨¸ù±¾¾Í²»ÐèÒª·µ»ØÖµ£»
2¡¢Èç¹ûÄã·µ»ØÁËÖµ£¬Ò²²»ÄÜ¿´µ½£¬ÄÇ´ËʱjvmÒ²²»ÖªµÀÄÃÕâ¸ö·µ»ØÖµÀ´¸Éʲô£¬ËùÒÔ¾ÍÓÃvoid¡£
»¹ÓÐÖÁÓÚΪʲôҪÓÃmain·½·¨ÄØ£¿Õâ¸öÊǹ涨£¬mainµÄÖÐÎÄÒâ˼ÊÇÖ÷ÒªµÄ£¬ËùÒÔÎÒÏë»ùÓÚÕâ¸öÔÒò£¬¾Í´ó¼Ò¶¼ÓÐÒ»¸öĬÈ϶¼ÓÃmain°É¡£
´ó¼Ò»¹ÓÐʲôÒÉÎÊ¿ÉÒÔ¸øÎÒÁôÑÔ£¬ÎÒÒ»¶¨¾¡Á¦È¥½â¾ö´ó¼ÒµÄÒÉÎÊ£¬Èç¹ûÒÔÉÏÓÐÈËÓв»Í¬µÄÒâ¼ûÒ²»¶Ó´Í½Ì£¡
Ïà¹ØÎĵµ£º
ÔÎÄ£ºhttp://csharpindepth.com/Articles/Chapter5/Closures.aspx
µÚÒ»¶ÎÂÔ¡£¡£¡£
´ó¶àÊý½²±Õ°üµÄÎÄÕ¶¼ÊÇ˵º¯ÊýʽÓïÑÔ£¬ÒòΪËüÃÇÍùÍù¶Ô±Õ°üµÄÖ§³Ö×îÍêÉÆ¡£µ±ÄãÔÚʹÓú¯ÊýʽÓïÑÔʱ£¬ºÜ¿ÉÄÜÒѾÇå³þÁ˽âÁËʲôÊDZհü£¬ËùÒÔÎÒÏëдһƪÔÚ¾µäOOÓïÑÔ³öÏֵıհüÓÐʲôÓô¦Ó¦¸ÃÒ²ÊǺܺÏÊʵÄÊÂÇé¡£ÕâÆªÎÄÕÂÎÒ×¼±¸½²Ò»ÏÂC#£¨1¡ ......
http://hi.baidu.com/0_net/blog/item/8566fc2bb730c293033bf63e.html
Ò».»ñµÃ¿ØÖÆÌ¨Óû§ÊäÈëµÄÐÅÏ¢
/** *//**»ñµÃ¿ØÖÆÌ¨Óû§ÊäÈëµÄÐÅÏ¢
* @return
* @throws IOException
*/
public St ......
JavaÎÊÌâ¾µä32ÎÊ
µÚÒ»£¬Ì¸Ì¸final£¬ finally£¬ finalizeµÄÇø±ð¡£
µÚ¶þ£¬Anonymous Inner Class £¨ÄäÃûÄÚ²¿Àࣩ ÊÇ·ñ¿ÉÒÔextends£¨¼Ì³Ð£©ÆäËüÀ࣬ÊÇ·ñ¿ÉÒÔimplements£¨ÊµÏÖ£©interface£¨½Ó¿Ú£©£¿
µÚÈý£¬Static Nested Class ºÍ Inner ClassµÄ²»Í¬£¬ËµµÃÔ½¶àÔ½ºÃ£¨ÃæÊÔÌâÓе ......
package com.sy.grasp;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegularExpression {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
......
×òÌì¿´ÕÅТÏéµÄjava¸ß¼¶½Ì³Ì£¬Ëû˵һ°ëÃæÊÔjavaÖÐÓ¢ÎļòдÒâ˼µÄ¶¼ÊÇһЩ´ó¹«Ë¾£¬Ò»¸ö¿¼²ìÄãÕæµÄÓùýÕâЩ¶«Î÷£¬È·Êµ¶ÔÕâЩ¶«Î÷Óиö»ù±¾Á˽⣬ͬʱÐèÒªÄã¾ßÓÐÒ»¶¨µÄÓ¢Óïˮƽ¡£ËùÒÔÔÝʱ²¹²¹¿Î£¬ºÇºÇ¡£
API (Application Programming Interface) Ó¦Óñà³Ì½Ó¿Ú
JRE (Java Runtime Enviroment) Java ÔËÐÐʱ»·¾³
JDK (Java Dev ......