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

javaÒì³£

Throwable
Throwable ÀàÊÇ Java ÓïÑÔÖÐËùÓдíÎó»òÒì³£µÄ³¬Àà¡£Ö»Ó屶ÔÏóÊÇ´ËÀࣨ»òÆä×ÓÀàÖ®Ò»£©µÄʵÀýʱ£¬²ÅÄÜͨ¹ý Java ÐéÄâ»ú»òÕß Java throw Óï¾äÅ׳ö¡£ÀàËƵأ¬Ö»ÓдËÀà»òÆä×ÓÀàÖ®Ò»²Å¿ÉÒÔÊÇ catch ×Ó¾äÖеIJÎÊýÀàÐÍ¡£
Á½¸ö×ÓÀàµÄʵÀý£¬Error ºÍ Exception£¬Í¨³£ÓÃÓÚָʾ·¢ÉúÁËÒì³£Çé¿ö¡£Í¨³££¬ÕâЩʵÀýÊÇÔÚÒì³£Çé¿öµÄÉÏÏÂÎÄÖÐнü´´½¨µÄ£¬Òò´Ë°üº¬ÁËÏà¹ØµÄÐÅÏ¢£¨±ÈÈç¶ÑÕ»¸ú×ÙÊý¾Ý£©¡£
2¡¢Exception
Exception À༰Æä×ÓÀàÊÇ Throwable µÄÒ»ÖÖÐÎʽ£¬ËüÖ¸³öÁ˺ÏÀíµÄÓ¦ÓóÌÐòÏëÒª²¶»ñµÄÌõ¼þ£¬±íʾ³ÌÐò±¾Éí¿ÉÒÔ´¦ÀíµÄÒì³£¡£
3¡¢Error
Error ÊÇ Throwable µÄ×ÓÀ࣬±íʾ½ö¿¿³ÌÐò±¾ÉíÎÞ·¨»Ö¸´µÄÑÏÖØ´íÎó£¬ÓÃÓÚָʾºÏÀíµÄÓ¦ÓóÌÐò²»Ó¦¸ÃÊÔͼ²¶»ñµÄÑÏÖØÎÊÌâ¡£
ÔÚÖ´Ðи÷½·¨Æڼ䣬ÎÞÐèÔÚ·½·¨ÖÐͨ¹ýthrowsÉùÃ÷¿ÉÄÜÅ׳öµ«Ã»ÓⶻñµÄ Error µÄÈκÎ×ÓÀ࣬ÒòΪJava±àÒëÆ÷²»È¥¼ì²éËü£¬Ò²¾ÍÊÇ˵£¬µ±³ÌÐòÖпÉÄܳöÏÖÕâÀàÒ쳣ʱ£¬¼´Ê¹Ã»ÓÐÓÃtry...catchÓï¾ä²¶»ñËü£¬Ò²Ã»ÓÐÓÃthrows×Ö¾äÉùÃ÷Å׳öËü£¬»¹ÊÇ»á±àÒëͨ¹ý¡£
4¡¢RuntimeException
RuntimeException ÊÇÄÇЩ¿ÉÄÜÔÚ Java ÐéÄâ»úÕý³£ÔËÐÐÆÚ¼äÅ׳öµÄÒì³£µÄ³¬Àà¡£Java±àÒëÆ÷²»È¥¼ì²éËü£¬Ò²¾ÍÊÇ˵£¬µ±³ÌÐòÖпÉÄܳöÏÖÕâÀàÒ쳣ʱ£¬¼´Ê¹Ã»ÓÐÓÃtry...catchÓï¾ä²¶»ñËü£¬Ò²Ã»ÓÐÓÃthrows×Ö¾äÉùÃ÷Å׳öËü£¬»¹ÊÇ»á±àÒëͨ¹ý£¬ÕâÖÖÒì³£¿ÉÒÔͨ¹ý¸Ä½ø´úÂëʵÏÖÀ´±ÜÃâ¡£
5¡¢ThreadDeath
µ÷Óà Thread ÀàÖдøÓÐÁã²ÎÊýµÄ stop ·½·¨Ê±£¬Êܺ¦Ï߳̽«Å׳öÒ»¸ö ThreadDeath ʵÀý¡£
½öµ±Ó¦ÓóÌÐòÔÚ±»Òì²½ÖÕÖ¹ºó±ØÐëÇå³ýʱ²ÅÓ¦¸Ã²¶»ñÕâ¸öÀàµÄʵÀý¡£Èç¹û ThreadDeath ±»Ò»¸ö·½·¨²¶»ñ£¬ÄÇô½«ËüÖØÐÂÅ׳ö·Ç³£ÖØÒª£¬ÒòΪÕâÑù²ÅÄÜÈøÃÏß³ÌÕæÕýÖÕÖ¹¡£
Èç¹ûûÓⶻñ ThreadDeath£¬Ôò¶¥¼¶´íÎó´¦Àí³ÌÐò²»»áÊä³öÏûÏ¢¡£
ËäÈ» ThreadDeath ÀàÊÇ“Õý³£³öÏÖ”µÄ£¬µ«ËüÖ»ÄÜÊÇ Error µÄ×ÓÀà¶ø²»ÊÇ Exception µÄ×ÓÀ࣬ÒòΪÐí¶àÓ¦ÓóÌÐò²¶»ñËùÓгöÏÖµÄ Exception£¬È»ºóÓÖ½«Æä·ÅÆú¡£
ÒÔÉÏÊǶÔÓйØÒì³£APIµÄÒ»¸ö¼òµ¥½éÉÜ£¬Ó÷¨¶¼ºÜ¼òµ¥£¬¹Ø¼üÔÚÓÚÀí½âÒì³£´¦ÀíµÄÔ­Àí£¬¾ßÌåÓ÷¨²Î¿´Java APIÎĵµ¡£
Èý¡¢JavaÒì³£´¦Àí»úÖÆ
¶ÔÓÚ¿ÉÄܳöÏÖÒì³£µÄ´úÂ룬ÓÐÁ½ÖÖ´¦Àí°ì·¨£º
µÚÒ»¡¢ÔÚ·½·¨ÖÐÓÃtry...catchÓï¾ä²¶»ñ²¢´¦ÀíÒì³££¬catachÓï¾ä¿ÉÒÔÓжà¸ö£¬ÓÃÀ´Æ¥Åä¶à¸öÒì³£¡£ÀýÈ磺
public void p(int x){
try{
...
}catch(Exception e){
...
}finally{
...
}
}
µÚ¶þ¡¢¶ÔÓÚ´¦Àí²»Á˵ÄÒì³£»òÕßҪתÐ͵ÄÒì³££¬ÔÚ·½·¨µ


Ïà¹ØÎĵµ£º

JNAʵÏÖJavaµ÷ÓÃFortran

Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......

ÔÚJavaÖлñȡϵͳÊôÐÔ

ÔÚJavaÖлñȡϵͳÊôÐÔ
 
ÔÚJavaÓ¦ÓóÌÐòÔËÐÐʱ£¬ÌرðÊÇÐèÒªÔÚ¿çƽ̨¹¤×÷»·¾³ÏÂÔËÐÐʱ£¬ÐèҪȷ¶¨²Ù×÷ϵͳÀàÐÍ¡¢Óû§JDK°æ±¾ºÍÓû§¹¤×÷Ŀ¼µÈË湤×÷ƽ̨±ä»¯µÄÐÅÏ¢£¬À´±£Ö¤³ÌÐòÕýÈ·ÔËÐС£Ò»°ãÇé¿öÏ£¬¿ÉÒÔÀûÓÃJDKÌṩµÄϵͳÊôÐÔÀࣨProperties£©Öеķ½·¨£¬¿ìËٵػñÈ¡¹¤×÷»·¾³ÐÅÏ¢¡£ÁíÍ⣬³ÌÐò¿ª·¢ÈËÔ±»¹¿ÉÒÔ¶¨ÒåÓëÓ¦Óà ......

javaÉú³ÉXMLÎļþ×Ô¶¯»»ÐÐÎÊÌâ

Java codeFormat ft=Format.getRawFormat();
ft.setEncoding("utf-8");
ft.setIndent("    ");//ÉèÖÃËõ½ø
       
XMLOutputter outputter=new XMLOutputter(ft);//ÉèÖÃXML¸ñʽ
Õâλ˵µÄ²»´í£»
ÔÚieÀïÃ棬ËüÄÜ°Ñxml×Ô¶¯½âÎö³ÆÊ÷Ðνṹ£¬ËùÒÔ¿´ÆðÀ´Ã»ÎÊÌ⣬ÔÚ¼Çʱ¾ÀïÃ棬¾Í²»ÐÐÁ ......

javaÃæÊÔÌâ¼°´ð°¸

1¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏó£º
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º
¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£¬²¢ÇÒÔÊÐíºÍ¹ÄÀøÀàµÄÖØ ......

Groovy javaµÄºÃ»ï°é5

ͨ¹ý Groovy ½øÐÐÑ­»·
ͬ´ó¶àÊý½Å±¾ÓïÑÔÒ»Ñù£¬Groovy ¾­³£±»Ðû´«ÎªÉú²úÁ¦¸ü¸ß µÄ Java ÓïÑÔÌæ´úÆ·¡£ÄúÒѾ­¿´µ½ÁË Groovy ȱÉÙÀàÐÍÄܹ»ÈçºÎ¼õÉÙ´ò×Ö¹¤×÷¡£ÔÚÕâÒ»½Ú£¬½«´´½¨²¢ÊÔÓÃÒ»¸ö repeat º¯Êý¡£ÔÚÕâ¸ö¹ý³ÌÖУ¬½«½øÒ»²½Ì½Ë÷ Groovy Ìá¸ßЧÂʵķ½Ê½¡£
¸üºÃ¡¢¸ü¶ÌµÄÑ­»·
ÏÂÃæÕâÖÖ·½·¨¿ÉÒÔ¸üºÃµØ¸ÐÊÜ Groovy ȱ·¦ÀàÐ͵ĺà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ