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

javaÒì³£´¦Àí

Ö»Õë¶Ô²»Õý³£µÄÌõ¼þ²ÅʹÓÃÒì³£
Òì³£Ö»Ó¦¸Ã±»ÓÃÓÚ²»Õý³£µÄÌõ¼þ£¬ËüÃÇÓÀÔ¶²»Ó¦±»ÓÃÓÚÕý³£µÄ¿ØÖÆÁ÷¡£
ÏÂÃæÊÇÒ»¸öÓÃÒì³£×÷±éÀú½áÊøÌõ¼þµÄÀÄÓÃÒì³£µÄÀý×Ó£º
//horrible abuse of exceptions. Don't ever do this!
try{
int i=0;
while(true)a[i++].f();
}catch(ArrayIndexOutOfBoundsException e){
...
}
Æä´íÓÐÈý£º
1¡¢´´½¨¡¢Å׳öºÍ²¶»ñÒì³£µÄ¿ªÏúÊǺܰº¹óµÄ¡£ÒòΪËüµÄ³õÖÔÊÇÓÃÓÚ²»Õý³£µÄÇéÐΣ¬ÉÙÓÐjvm»áËü½øÐÐÐÔÄÜÓÅ»¯¡£
2¡¢°Ñ´úÂë·ÅÔÚtry-catchÖлá×èÖ¹jvmʵÏÖ±¾À´¿ÉÄÜÒªÖ´ÐеÄijЩÌض¨µÄÓÅ»¯¡£
3¡¢ÓÐЩÏÖ´úµÄjvm¶ÔÑ­»·½øÐÐÓÅ»¯£¬²»»á³öÏÖÈßÓàµÄ¼ì²é¡£
ÍêÈ«¿ÉÒÔʹÓñê×¼µÄʵÏÖ·½Ê½£º
for(int i=0;i<a.length;i++){
a[i].f();
}

ÕâÌõÔ­ÔòÒ²ÊÊÓÃÓÚAPIÉè¼Æ¡£Ò»¸öÉè¼ÆÁ¼ºÃµÄAPI²»Ó¦¸ÃÇ¿ÆÈËüµÄ¿Í»§ÎªÁËÕý³£µÄ¿ØÖÆÁ÷¶øʹÓÃÒì³£¡£Èç¹ûÀàÖÐÓÐÒ»¸ö”״̬Ïà¹Ø”µÄ·½·¨£¬¼´Ö»ÓÐÌض¨µÄÌõ¼þÏ¿ɱ»µ÷Óõķ½·¨£¬ÔòÕâ¸öÀàÒ²Ó¦ÓÐÒ»¸öµ¥¶ÀµÄ“״̬²âÊÔ”·½·¨£¬ÒÔΪµ÷ÓÃÕâ¸ö״̬Ïà¹Ø·½·¨Ç°µÄ¼ì²é¡£ÈçCollectionÀàµÄnext·½·¨ºÍ hasNext·½·¨¡£
for(Iterator i=collection.iterator();i.hasNext();){
Foo foo=(Foo)i.next();
...
}
¶ÔÓڿɻָ´µÄÌõ¼þʹÓñ»¼ì²éµÄÒì³££¬¶ÔÓÚ³ÌÐò´íÎóʹÓÃÔËÐÐʱÒì³£
    javaÌṩÁËÈýÖÖ¿ÉÅ׳öµÄÒì³££º±»¼ì²éµÄÒì³££¨checkedException£©¡¢ÔËÐÐʱÒì³££¨run-time Exception£©ºÍ´íÎó(error)¡£¡¡¡¡Èç¹ûÆÚÍûµ÷ÓÃÕßÔÚµ÷ÓÃʱ³öÏÖµÄÒì³£Äܹ»»Ö¸´£¬ÔòÓ¦¸ÃʹÓñ»¼ì²éµÄÒì³££¬Í¨¹ýÅ׳öÒ»¸ö±»¼ì²éµÄÒì³££¬Ç¿Æȵ÷ÓÃÕßÔÚcatchÖд¦Àí¸ÃÒì³££¬»òÕß½«Òì³£´«²¥µ½ÍâÃæ¡£
¡¡¡¡¶ÔÓÚÒ»¸ö·½·¨ÉùÃ÷ÒªÅ׳öµÄÿһ¸ö±»¼ì²éµÄÒì³££¬ËüÊǶÔAPIÓû§µÄÒ»ÖÖDZÔÚָʾ£ºÓëÒì³£Ïà¹ØÁªµÄÌõ¼þÊǵ÷ÓÃÕâ´Î¸ö·½·¨µÄÒ»ÖÖ¿ÉÄܽá¹û¡£
¡¡¡¡Á½ÖÖδ±»¼ì²éµÄ¿ÉÅ׳ö½á¹¹£ºÔËÐÐʱÒì³£ºÍ´íÎó£¬ÔÚÐÐΪÉÏÏàͬµÄ£¬ËüÃǶ¼²»ÐèÒª¡¢Ò²²»Ó¦¸Ã±»²¶»ñµÄÅ׳öÎï¡£ÄãËùʵÏÖµÄËùÓÐδ±»¼ì²éµÄÅ׳ö½á¹¹¶¼Ó¦ÊÇ RuntimeExceptionµÄ×ÓÀà¡£¶¨ÒåÒ»¸ö·ÇException¡¢RuntimeException»òError×ÓÀàµÄÅ׳öÎïÊÇ¿ÉÐеģ¬µ«´ÓÐÐΪÒâÒåÉÏËüµÈͬÓÚ±»ÆÕͨµÄ±»¼ì²éÒì³££¨¼´Exception×ÓÀà¶ø·ÇRuntimeException×ÓÀࣩ.
±ÜÃâ²»±ØÒªµØʹÓñ»¼ì²éµÄÒì³£
    Óë·µ»Ø´úÂ벻ͬ£¬±»¼ì²éµÄÒ쳣ǿÆȳÌÐò´¦ÀíÀýÍâµÄÇé¿ö£¬´Ó¶ø´ó´óµØÌá¸ßÁ˳ÌÐòµÄ¿É¿¿ÐÔ¡£¶ø¹ý·ÖµØʹÓñ»¼ì²éµÄÒì³£


Ïà¹ØÎĵµ£º

JAVAÖеÄÔËËã·û

£¨
1
£©
+=
:sum += 1;
Ï൱ÓÚ
sum = sum + 1;
£¨
2
£©
++ --
:i++ i
¼Ó
1, i-- i
¼õ
1, ++
»ò

·ÅÔÚÊýÖµºó£¬±íʾִÐÐÔËËãºó¼Ó£¨¼õ£©
1
£¬·´ÕýÊýֵǰ±íʾִÐÐÔËËãÇ°¼Ó£¨¼õ£©
1
£¨
3
£©

: :
int n = a<10?1:2
±íʾÈç¹û
a
СÓÚ
10
Ôò
n
µÈÓÚ
1
·ñÔòµÈÓÚ
2
£¨
4
......

Java Swing JEditorPane

JEditorPaneÌṩÈýÖÖÀàÐ͵ÄÎı¾ÏÔʾ£¬text/plain,text/html,text/rtf.
JEditorPaneµÄ¼òµ¥Ó÷¨DEMOÈçÏ£º
package ibees.swing;
import java.awt.Toolkit;
import java.io.IOException;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.event.Hype ......

ÔÚJava web·þÎñÆ÷ÄÚʹÓÃurl rewrite

ÿ¸öÍøÒ³»òÇëÇó¶¼ÊÇÒ»¸öurlµØÖ·£¬Ò»°ã£¬Õâ¸öµØÖ·¿ÉÄÜÊÇ.do,.page,.actionÖ®ÀàµÄ²¢¼ÓÉÏ'?'ºÅ¡¢'&'ºÅ²éѯ´®µÈ¹¹³ÉµÄÒ»¸ö³¤³¤µÄµÄurl¡£ºÜurgly¡£
Ò»°ãµÄurl----------------------------------------------------------½ÏºÃµÄurl
http://www.xxx.net/user/profile.do?id=20001   ====> http://www.xxx.ne ......

javaö¾Ù

javaö¾Ù
ΪʲôҪ¶¨Òåö¾Ù£¿
ÎÊÌ⣺Ҫ¶¨ÒåÐÇÆÚ¼¸»òÐÔ±ðµÄ±äÁ¿£¬¸ÃÔõô¶¨Ò壿¼ÙÉèÓÃ1-7·Ö±ð±íʾÐÇÆÚÒ»µ½ÐÇÆÚÈÕ£¬µ«ÓÐÈË¿ÉÄÜ»áд³Éint weekday = 0;
ö¾Ù¾ÍÊÇÒªÈÃij¸öÀàÐ͵ıäÁ¿µÄÈ¡ÖµÖ»ÄÜΪÈô¸É¸ö¹Ì¶¨ÖµÖеÄÒ»¸ö£¬·ñÔò£¬±àÒëÆ÷¾Í»á±¨´í£¬Ã¶¾Ù¿ÉÒÔÈñàÒëÆ÷ÔÚ±àÒëʱ¾Í¿ÉÒÔ¿ØÖƳÌÐòÖÐÌîдµÄ·Ç·¨Öµ£¬ÆÕͨ±äÁ¿µÄ·½Ê½ÔÚ¿ª·¢½×¶ ......

java Ïà¶Ô·¾¶ ¾ø¶Ô·¾¶ classes bin ¸ùĿ¼

³¢ÊÔÓÃDOM4j½âÎöspringÅäÖÃÎļþʱ,µÚÒ»²½¶ÁÈ¡Îļþʱ£¬»ñȡ·¾¶¾ÍÓöµ½ÁËÎÊÌ⣬¡£¡£¡£¾­¹ýgoogleÁËn+log n ´Î¸öÒ³Ã棬²ÅËãÓÐÁ˸ö´ÖdzµÄÈÏʶ£¬ÏÂÃæ¾ÍÈÃÎÒÓüò¶ÌµÄ»°ÓïÀ´×ܽáһϣ¨ºÃÏñÕâ¶Î¾ÍÈ«ÊÇ·Ï»°¡£¡£¡££©¡£¡£¡£
1¡¢springµÄÅäÖÃÎļþ´æ·ÅλÖÃÓÉweb.xmlÀïµÄcontextConfigLocationÀ´È·¶¨£¬Ò»°ãÊÇ·ÅÔÚweb-inf»òÕßÊÇsrc¸ùÄ¿Â¼Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ