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

JavaÃæÊÔÌâ

    JavaÃæÊÔÌâ—»ù´¡·½Ãæ:
1¡¢×÷ÓÃÓòpublic,private,protected,ÒÔ¼°²»Ð´Ê±µÄÇø±ð£¿
´ð£ºÇø±ðÈçÏ£º
×÷ÓÃÓò  µ±Ç°Àà ͬһpackag ×ÓËïÀà ÆäËûpackage
public √ √ √ √
protected √ √ √ ×
friendly √ √ × ×
private √ × × ×
²»Ð´Ê±Ä¬ÈÏΪfriendly
2¡¢charÐͱäÁ¿ÖÐÄܲ»ÄÜ´æÖüÒ»¸öÖÐÎĺº×Ö?Ϊʲô?
´ð£ºÊÇÄܹ»¶¨Òå³ÉΪһ¸öÖÐÎĵģ¬ÒòΪjavaÖÐÒÔunicode±àÂ룬һ¸öcharÕ¼16¸ö×Ö½Ú£¬ËùÒÔ·ÅÒ»¸öÖÐÎÄ×Ö·ûÊÇûÎÊÌâµÄ¡£
3¡¢Anonymous Inner Class (ÄäÃûÄÚ²¿Àà) ÊÇ·ñ¿ÉÒÔextends(¼Ì³Ð)ÆäËüÀ࣬ÊÇ·ñ¿ÉÒÔimplements(ʵÏÖ)interface(½Ó¿Ú)£¿
´ð£ºÄäÃûµÄÄÚ²¿ÀàÊÇûÓÐÃû×ÖµÄÄÚ²¿À࣬²»ÄÜextends(¼Ì³Ð) ÆäËüÀ࣬µ«Ò»¸öÄÚ²¿Àà¿ÉÒÔ×÷Ϊһ¸ö½Ó¿Ú£¬ÓÉÁíÒ»¸öÄÚ²¿ÀàʵÏÖ¡£
4¡¢Static Nested Class ºÍInner ClassµÄ²»Í¬£¿
´ð£ºNested Class £¨Ò»°ãÊÇC++µÄ˵·¨£©£¬Inner Class (Ò»°ãÊÇJAVAµÄ˵·¨)¡£JavaÄÚ²¿ÀàÓëC++ǶÌ×Àà×î´óµÄ²»Í¬¾ÍÔÚÓÚÊÇ·ñÓÐÖ¸ÏòÍⲿµÄÒýÓÃÉÏ¡£×¢£º ¾²Ì¬ÄÚ²¿ÀࣨInner Class£©Òâζ×Å1´´½¨Ò»¸östaticÄÚ²¿ÀàµÄ¶ÔÏ󣬲»ÐèÒªÒ»¸öÍⲿÀà¶ÔÏó£¬2²»ÄÜ´ÓÒ»¸östaticÄÚ²¿ÀàµÄÒ»¸ö¶ÔÏó·ÃÎÊÒ»¸öÍⲿÀà¶ÔÏó¡£
5¡¢&ºÍ&&µÄÇø±ð£¿
´ð£º&ÊÇλÔËËã·û£¬±íʾ°´Î»ÓëÔËË㣬&&ÊÇÂß¼­ÔËËã·û£¬±íʾÂß¼­Ó루and£©¡£
6¡¢Collection ºÍCollectionsµÄÇø±ð£¿
´ð£ºCollectionÊǼ¯ºÏÀàµÄÉϼ¶½Ó¿Ú£¬¼Ì³ÐÓëËûµÄ½Ó¿ÚÖ÷ÒªÓÐSet ºÍList¡£
   CollectionsÊÇÕë¶Ô¼¯ºÏÀàµÄÒ»¸ö°ïÖúÀ࣬ËûÌṩһϵÁо²Ì¬·½·¨ÊµÏÖ¶Ô¸÷ÖÖ¼¯ºÏµÄËÑË÷¡¢ÅÅÐò¡¢Ḭ̈߳²È«»¯µÈ²Ù×÷¡£
7¡¢Ê²Ã´Ê±ºòÓÃassert£¿
´ð£ºassertion(¶ÏÑÔ)ÔÚÈí¼þ¿ª·¢ÖÐÊÇÒ»ÖÖ³£Óõĵ÷ÊÔ·½Ê½£¬ºÜ¶à¿ª·¢ÓïÑÔÖж¼Ö§³ÖÕâÖÖ»úÖÆ¡£ÔÚʵÏÖÖУ¬assertion¾ÍÊÇÔÚ³ÌÐòÖеÄÒ»ÌõÓï¾ä£¬Ëü¶ÔÒ»¸öboolean±í´ïʽ½øÐмì²é£¬Ò»¸öÕýÈ·³ÌÐò±ØÐë±£Ö¤Õâ¸öboolean±í´ïʽµÄֵΪtrue£»Èç¹û¸ÃֵΪfalse£¬ËµÃ÷³ÌÐòÒѾ­´¦ÓÚ²»ÕýÈ·µÄ״̬Ï£¬ÏµÍ³½«¸ø³ö¾¯¸æ»òÍ˳ö¡£Ò»°ãÀ´Ëµ£¬assertionÓÃÓÚ±£Ö¤³ÌÐò×î»ù±¾¡¢¹Ø¼üµÄÕýÈ·ÐÔ¡£assertion¼ì²éͨ³£ÔÚ¿ª·¢ºÍ²âÊÔʱ¿ªÆô¡£ÎªÁËÌá¸ßÐÔÄÜ£¬ÔÚÈí¼þ·¢²¼ºó£¬assertion¼ì²éͨ³£Êǹرյġ£
8¡¢´úÂëString s = new String("xyz");´´½¨Á˼¸¸öString Object£¿
´ð£ºÁ½¸ö£¬Ò»¸ö×Ö·û¶ÔÏó£¬Ò»¸ö×Ö·û¶ÔÏóÒýÓöÔÏó¡£
9¡¢Math.round(11.5)µÈ춶àÉÙ? Math.round(-11.5)µ


Ïà¹ØÎĵµ£º

javaÖÐÈí¼þ¿ª·¢µÄ¼Ù·ÖÒ³ºÍÄ£ºý²éѯµÄ·½·¨

 int pagenum=0;
  int pagesize = 4;
  int nowpage = 1;
String showpage = request.getParameter("page");
  String sdept1 = request.getParameter("selectdept");
 if(showpage!=null){
   nowpage = Convertutil.strtoint(showpage);
  }
......

Java Òì³£´¦Àí

 Java Òì³££¨ Exception£©·ÖΪÊÜ¿ØÒì³£ºÍ²»ÊÜ¿ØÒì³£Á½ÖÖ¡£ÆäÖÐÊÜ¿ØÒì³£±ØÐëÇ¿ÖÆÖ´Ðⶻñ»òÕßÉùÃ÷£¬·ñÔò½«³öÏÖ±àÒë´íÎó¡£ ¶ÔÓÚ·ÇÊÜ
 
¿ØÒì³£java±àÒëÆ÷²»»á¼ì²é´úÂëÒÔÈ·¶¨ÊDz¶»ñ»òÕßÉùÃ÷²»ÊÜ¿ØÒì³£¡£¾¡¹Ü±àÒëÆ÷¶Ô²»ÊÜ¿ØÒ쳣ûÓⶻñ»òÕßÉùÃ÷µÄÇ¿ÖÆÒªÇ󣬵«ÖªµÀ·¢ÉúÕâÖÖÒ쳣ʱӦÌṩºÏÊʵÄÒì³£´¦Àí´úÂë¡£
  ......

JavaÕýÔò±í´ïʽµÄ½âÊÍ˵Ã÷


±¾ÎÄ·ÖÊ®ËĸöÀà±ð¶ÔÕýÔò±í´ïʽµÄÒâÒå½øÐÐÁ˽âÊÍ£¬ÕâÊ®Ëĸ÷Àà±ðÊÇ£º×Ö·û/×Ö·ûÀà/Ô¤¶¨Òå×Ö·ûÀà/POSIX×Ö·ûÀà/java.lang.CharacterÀà/Unicode¿éºÍÀà±ðµÄÀà/±ß½çÆ¥ÅäÆ÷/GreedyÊýÁ¿´Ê/ReluctantÊýÁ¿´Ê/PossessiveÊýÁ¿´Ê/LogicalÔËËã·û/BackÒýÓÃ/ÒýÓÃ/ÌØÊâ¹¹Ôì¡£
1.1.×Ö·û
x    ×Ö·û x¡£ÀýÈça±íʾ×Ö·ûa
\\&nbs ......

JavaµÄÖÐÎÄ´¦Àíѧϰ±Ê¼Ç£ºHello Unicode

 ×÷Õߣº³µ¶« ·¢±íÓÚ£º2002-07-09 15:07 ×îºó¸üÐÂÓÚ£º2007-04-12 11:04
°æȨÉùÃ÷£º¿ÉÒÔÈÎÒâתÔØ£¬×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂԭʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷¡£
http://www.chedong.com/tech/hello_unicode.html
²»ÖªµÀÄãÓÐûÓÐÕâÑùµÄ¸ÐÊÜ£ºÎªÊ²Ã´PHPºÜÉÙÓÐÂÒÂëÎÊÌâ¶øÓÃJava×öWEBÓ¦ÓÃÈ´ÕâôÂé·³ÄØ£¿ÎªÊ²Ã´ÔÚGoogl ......

Java½â¾ö¸÷ÖÖÖÐÎÄÂÒÂëÎÊÌ⣨1£©getºÍpostÇëÇó

×÷Ϊjava³ÌÐòÔ±£¬ÖÐÎĵÄÂÒÂëÎÊÌâ»á¾­³£Åöµ½¡£¹ýÈ¥µÄÒ»¸öÏîÄ¿£¬ÎÒÅöµ½Á˸÷ÖÖÀàÐ͵ÄjavaÂÒÂëÎÊÌâ¡£ÏÈ·ÖÏí¸ø´ó¼Ò£º
 
1£ºÍøÒ³PostÇëÇó£¬Ìá½»ºó£¬ÏÔʾÌá½»½á¹û£¬ÂÒÂë¡£
Ê×ÏÈÈ·¶¨Êý¾Ý¿âµÄ±àÂ뷽ʽ¡£ÕâÀïÎÒ·¢ÏÖ£¬Èç¹ûÊý¾Ý¿âµÄ±àÂë²»ÊÇUTF-8£¬PostÇëÇóÒ²¿ÉÒÔ±£Ö¤»ØÏÔÕýÈ·£¬µ«ÊÇÓÐÒ»¸öµØ·½Òª×¢Òâ¡£
ÈçhtmlÖУº
£¨1£©<i ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ