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

Java½â»ó4 40²»ÇéÔ¸µÄ¹¹ÔìÆ÷

¾¡¹ÜÔÚÒ»¸ö·½·¨ÉùÃ÷Öп´µ½Ò»¸öthrows×Ó¾äÊǺܳ£¼ûµÄ£¬µ«ÊÇÔÚ¹¹ÔìÆ÷µÄÉùÃ÷Öп´µ½Ò»¸öthrows×Ó¾ä¾ÍºÜÉÙ¼ûÁË¡£ÏÂÃæµÄ³ÌÐò¾ÍÓÐÕâÑùµÄÒ»¸öÉùÃ÷¡£ÄÇô£¬Ëü½«´òÓ¡³öʲôÄØ£¿
public class Reluctant {
private Reluctant internalInstance = new Reluctant();
public Reluctant() throws Exception {
throw new Exception("I'm not coming out");
}
public static void main(String[] args) {
try {
Reluctant b = new Reluctant();
System.out.println("Surprise!");
} catch (Exception ex) {
System.out.println("I told you so");
}
}
}
main·½·¨µ÷ÓÃÁËReluctant¹¹ÔìÆ÷£¬Ëü½«Å׳öÒ»¸öÒì³£¡£Äã¿ÉÄÜÆÚÍûcatch×Ó¾äÄܹ»²¶»ñÕâ¸öÒì³££¬²¢ÇÒ´òÓ¡I told you so¡£´Õ½ü×Ðϸ¿´¿´Õâ¸ö³ÌÐò¾Í»á·¢ÏÖ£¬ReluctantʵÀý»¹°üº¬µÚ¶þ¸öÄÚ²¿ÊµÀý£¬ËüµÄ¹¹ÔìÆ÷Ò²»áÅ׳öÒ»¸öÒì³£¡£ÎÞÂÛÅ׳öÄÄÒ»¸öÒì³££¬¿´ÆðÀ´mainÖеÄcatch×Ӿ䶼Ӧ¸Ã²¶»ñËü£¬Òò´ËÔ¤²â¸Ã³ÌÐò½«´òÓ¡I told youÓ¦¸ÃÊÇÒ»¸ö°²È«µÄ¶Ä×¢¡£µ«Êǵ±Äã³¢ÊÔ×ÅÈ¥ÔËÐÐËüʱ£¬¾Í»á·¢ÏÖËüѹ¸ùûÓÐÈ¥×öÕâÀàµÄÊÂÇ飺ËüÅ׳öÁËStackOverflowErrorÒì³££¬ÎªÊ²Ã´ÄØ£¿
Óë´ó¶àÊýÅ׳öStackOverflowErrorÒì³£µÄ³ÌÐòÒ»Ñù£¬±¾³ÌÐòÒ²°üº¬ÁËÒ»¸öÎÞÏ޵ݹ顣µ±Äãµ÷ÓÃÒ»¸ö¹¹ÔìÆ÷ʱ£¬ÊµÀý±äÁ¿µÄ³õʼ»¯²Ù×÷½«ÏÈÓÚ¹¹ÔìÆ÷µÄ³ÌÐòÌå¶øÔËÐÐ[JLS 12.5]¡£ÔÚ±¾ÃÕÌâÖУ¬ internalInstance±äÁ¿µÄ³õʼ»¯²Ù×÷µÝ¹éµ÷ÓÃÁ˹¹ÔìÆ÷£¬¶ø¸Ã¹¹ÔìÆ÷ͨ¹ýÔٴε÷ÓÃReluctant¹¹ÔìÆ÷¶ø³õʼ»¯¸Ã±äÁ¿×Ô¼ºµÄinternalInstanceÓò£¬Èç´ËÎÞÏ޵ݹéÏÂÈ¥¡£ÕâЩµÝ¹éµ÷ÓÃÔÚ¹¹ÔìÆ÷³ÌÐòÌå»ñµÃÖ´Ðлú»á֮ǰ¾Í»áÅ׳öStackOverflowErrorÒì³££¬ÒòΪStackOverflowErrorÊÇErrorµÄ×ÓÀàÐͶø²»ÊÇExceptionµÄ×ÓÀàÐÍ£¬ËùÒÔcatch×Ó¾äÎÞ·¨²¶»ñËü¡£
¶ÔÓÚÒ»¸ö¶ÔÏó°üº¬ÓëËü×Ô¼ºÀàÐÍÏàͬµÄʵÀýµÄÇé¿ö£¬²¢²»ÉÙ¼û¡£ÀýÈ磬Á´½ÓÁбí½Úµã¡¢Ê÷½ÚµãºÍͼ½Úµã¶¼ÊôÓÚÕâÖÖÇé¿ö¡£Äã±ØÐë·Ç³£Ð¡Ðĵسõʼ»¯ÕâÑùµÄ°üº¬ÊµÀý£¬ÒÔ±ÜÃâStackOverflowErrorÒì³£¡£
ÖÁÓÚ±¾ÃÕÌâÃûÒåÉϵÄÌâÄ¿£ºÉùÃ÷½«Å׳öÒì³£µÄ¹¹ÔìÆ÷£¬ÄãÐèҪעÒ⣬¹¹ÔìÆ÷±ØÐëÉùÃ÷ÆäʵÀý³õʼ»¯²Ù×÷»áÅ׳öµÄËùÓб»¼ì²éÒì³£¡£ÏÂÃæÕâ¸öչʾÁ˳£¼ûµÄ“·þÎñÌṩÉ̔ģʽµÄ³ÌÐò£¬½«²»ÄܱàÒ룬ÒòΪËüÎ¥·´ÁËÕâÌõ¹æÔò£º
public class Car {
private static Class engineClass = ...;
private Engine engine =
(Engine)engin


Ïà¹ØÎĵµ£º

IBM FileNet Content Java API ¼ò½é

2008 Äê 6 ÔÂ 24 ÈÕ
Ô­ÎĵØÖ·£º http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
±¾ÎĽéÉÜ IBM FileNet P8 4.0 Platform ÌṩµÄ Content Java API¡£Ê×ÏÈ¶Ô FileNet P8 Content Engine ºÍ API ½øÐиÅÒª½éÉÜ, ²¢ËµÃ÷ÁËһЩ»ù±¾¸ÅÄËæºóÏêϸ½éÉÜÁË FileNet Content EngineÌṩµÄ»ùÓÚ EJB ......

Java½â»ó2 28Ñ­»·Õß

ÏÂÃæµÄÃÕÌâÒÔ¼°ËæºóµÄÎå¸öÃÕÌâ¶ÔÄãÀ´ËµÊÇŤתÁ˾ÖÃ棬ËüÃDz»ÊÇÏòÄãչʾijЩ´úÂ룬ȻºóѯÎÊÄãÕâЩ´úÂ뽫×öЩʲô£¬ËüÃÇÒªÈÃÄãȥд´úÂ룬µ«ÊÇÊýÁ¿»áºÜÉÙ¡£ÕâЩÃÕÌâ±»³ÆΪ“Ñ­»·Õߣ¨looper£©”¡£ÄãÑÛÇ°»áչʾ³öÒ»¸öÑ­»·£¬Ëü¿´ÆðÀ´Ó¦¸ÃºÜ¿ì¾ÍÖÕÖ¹µÄ£¬¶øÄãµÄÈÎÎñ¾ÍÊÇдһ¸ö±äÁ¿ÉùÃ÷£¬ÔÚ½«Ëü×÷ÓÃÓÚ¸ÃÑ­»·Ö®ÉÏʱ£¬Ê¹µÃ¸Ã ......

ת£¡Java webservice

Ò»¡¢Ç°ÑÔ

   
±¾Îļٶ¨ÄãÓÐÒ»¶¨µÄJ2EE¿ª·¢¾­Ñ飬Õâ¸ö½Ì³ÌûÓйý¶àµÄÉæ¼°»ù´¡ÖªÊ¶ºÍ¿ª·¢Ï¸½Ú¡£Èç¹ûÔÚÔĶÁ¹ý³Ì³öÓÐʲôÎÊÌ⣬»¹ÇëÓëÎÒÁªÏµ½»Á÷¡£
     
Èç¹ûʹÓÃGOOGLE¡¢BAIDUµÈËÑË÷¹¤¾ß£¬ËÑË÷WebServiceµÄÏà¹Ø֪ʶ£¬¿ÉÒԲ鵽N¶àµÄÍøÒ³£¬ÎÒ¾ÍÊÇͨ¹ýÕâЩÍøÒ³µÄѧϰ£¬Öð½¥ÕÆÎ ......

javaÖÐÈçºÎʹÓÃamcharts


×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......

java emun µÄ±ðÑùÓ÷¨£¬¿ÉÒÔѧϰÏ£¬

package com.zwc.www.test;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class OperateEnum {
 //first emun
 enum PeopleTypeOne{RED,YELLOW,BLACK}; 
 
 //second emun
 public enum PeopleTypeTwo{
  RED("a","#111111"),
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ