锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品视频免费看,最新国产AV无码专区亚洲,亚洲乱码日产一区三区http://m.tkk7.com/vcycyv/category/47721.htmlzh-cnSun, 21 Jun 2015 02:10:31 GMTSun, 21 Jun 2015 02:10:31 GMT60Encountered an exception that google doesn't know: NoSuchMethodError: findMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/String;ZZ)Lorg/springframework/core/annotation/AnnotationAttributes;http://m.tkk7.com/vcycyv/archive/2015/06/21/425810.html浜哄湪姹熸箹浜哄湪姹熸箹Sun, 21 Jun 2015 01:08:00 GMThttp://m.tkk7.com/vcycyv/archive/2015/06/21/425810.htmlhttp://m.tkk7.com/vcycyv/comments/425810.htmlhttp://m.tkk7.com/vcycyv/archive/2015/06/21/425810.html#Feedback1http://m.tkk7.com/vcycyv/comments/commentRss/425810.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/425810.html鎴戝湪鍐欎竴涓敤spring boot鐨勫簲鐢紝闇瑕佷簡榪欎釜exception:
NoSuchMethodError: findMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/String;ZZ)Lorg/springframework/core/annotation/AnnotationAttributes;
at org.springframework.test.util.MetaAnnotationUtils$AnnotationDescriptor.<init>(MetaAnnotationUtils.java:290)
at org.springframework.test.util.MetaAnnotationUtils$UntypedAnnotationDescriptor.<init>(MetaAnnotationUtils.java:365)
at org.springframework.test.util.MetaAnnotationUtils$UntypedAnnotationDescriptor.<init>(MetaAnnotationUtils.java:360)
at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:191)
at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:208)
at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:166)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:274)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildTestContext(AbstractTestContextBootstrapper.java:110)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:120)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:105)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:143)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:134)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

The solution is: in the pom.xml, instead of using 
<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.3.0.BUILD-SNAPSHOT</version>
</parent>

Use a specific version:
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.2.4.RELEASE</version>
    </parent>


]]>
涓篞A鍑嗗鐨勭敤浠ユц兘嫻嬭瘯鐨刯ava縐掕〃http://m.tkk7.com/vcycyv/archive/2013/04/04/397392.html浜哄湪姹熸箹浜哄湪姹熸箹Thu, 04 Apr 2013 14:28:00 GMThttp://m.tkk7.com/vcycyv/archive/2013/04/04/397392.htmlhttp://m.tkk7.com/vcycyv/comments/397392.htmlhttp://m.tkk7.com/vcycyv/archive/2013/04/04/397392.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/397392.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/397392.html浠ュ墠QA鍋氭ц兘嫻嬭瘯鐢ㄦ墜鏈虹殑縐掕〃錛屽緢涓嶆柟渚褲傚墠涓ゅ勾涓篞A鍋氫簡涓涓猨ava縐掕〃錛岃褰曢紶鏍囦袱嬈$偣鍑諱箣闂寸殑鏃墮棿宸備絾鏄偅鏄熀浜嶫Invoke鐨勶紝JInvoke鏄敹璐硅蔣浠訛紝鏈夎瘯鐢ㄧ殑鏃墮檺錛岀敤鏉ュ皝瑁匤NI緙栫▼鐨勫鏉傛с傛渶榪慟A瑕佹眰鎴戝啀鎼炰竴涓畬鍏ㄥ厤璐圭殑綾諱技杞歡銆傝繖嬈$敤鐨勬槸jnativehook.
jnativehook鍙互鐢ㄦ潵鐩戞帶閿洏鍜岄紶鏍囩殑浜嬩歡銆傚簳灞傞氳繃璋冪敤涓嶅悓騫沖彴鐨刵ative code灞忚斀浜嗗鉤鍙扮浉鍏蟲с傚畠寮哄ぇ鐨勫湴鏂瑰湪浜庯紝鍩轟簬jnativehook鐨勮蔣浠跺彲浠ュ悗鍙拌繍琛岋紝娌℃湁綾諱技“鐩戞帶鏌愮獥鍙?/strong>鍐呴敭鐩?榧犳爣浜嬩歡”鐨勯檺鍒躲?/div>
鎵╁睍jnativehook鐨勮繖涓皬宸ュ叿鍙互璁板綍涓ゆ榧犳爣鐐瑰嚮涔嬮棿鐨勬椂闂村樊錛屾洿紜垏鍦拌錛屾槸璁板綍絎竴嬈¢紶鏍囨姮璧峰拰絎簩嬈¢紶鏍囨寜涓?/strong>鐨勬椂闂村樊銆備婦涓涓猀A浣跨敤鐨勪緥瀛愶紝姣斿鍦║I涓婄偣鍑諱竴涓猙utton錛岀瓑鐫鎵ц鎴愬姛寮瑰嚭鐨勫璇濇銆俀A鍦ㄧ偣鍑籦utton鏃訛紝榧犳爣涓鎶搗錛岃繖涓皬宸ュ叿灝卞紑濮嬭鏃訛紝褰換A鐪嬭瀵硅瘽妗嗘椂錛岄┈涓婂湪灞忓箷浠繪剰浣嶇疆鐐歸紶鏍囷紝杞歡灝辮褰曚簡榪欎袱嬈$偣鍑諱箣闂寸殑鏃墮棿宸傚綋鐒訛紝榪欐牱鍋氳繕鏄笉澶熺簿紜紝瀛樺湪浜哄弽搴旀椂闂寸殑璇樊銆?/div>
jnativehook欏圭洰鐨勪富欏靛湪 https://code.google.com/p/jnativehook/
鎴戞墿灞曠▼搴忕殑婧愪唬鐮佸涓嬶細
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.mouse.NativeMouseEvent;
import org.jnativehook.mouse.NativeMouseInputListener;


public class MouseHook  implements NativeMouseInputListener  {

    static double startPoint = 0.0;
    /**
     * 
@param args
     
*/
    public static void main(String[] args) {
        try {
            GlobalScreen.registerNativeHook();
    }
    catch (NativeHookException ex) {
            System.err.println("There was a problem registering the native hook.");
            System.err.println(ex.getMessage());

            System.exit(1);
    }

    //Construct the example object.
        MouseHook example = new MouseHook();

    //Add the appropriate listeners for the example object.
    GlobalScreen.getInstance().addNativeMouseListener(example);

    }

    @Override
    public void nativeMouseClicked(NativeMouseEvent arg0) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void nativeMousePressed(NativeMouseEvent arg0) {
        System.out.println((System.currentTimeMillis() - startPoint)/1000);
        
    }

    @Override
    public void nativeMouseReleased(NativeMouseEvent arg0) {
        startPoint = System.currentTimeMillis();        
    }

    @Override
    public void nativeMouseDragged(NativeMouseEvent arg0) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void nativeMouseMoved(NativeMouseEvent arg0) {
        // TODO Auto-generated method stub
        
    }

}
鍙互鍦╡clipse閲屽彸閿偣java 欏圭洰錛屽湪export...閲岄夋嫨Java鐩綍涓嬬殑Runnable Jar File
鍋囧浣犱繚瀛樼殑jar鏂囦歡鍙玬ousehook.jar. 鍙互鐩存帴浣跨敤java -jar mousehook.jar鍚姩灝卞彲浠ヤ嬌鐢ㄤ簡銆?/div>

]]>鍏充簬璋冧紭涔嬫暟鎹簱綃囷紙涓錛?/title><link>http://m.tkk7.com/vcycyv/archive/2013/03/31/397206.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Sun, 31 Mar 2013 13:49:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2013/03/31/397206.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/397206.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2013/03/31/397206.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/397206.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/397206.html</trackback:ping><description><![CDATA[<div style="font-family: 寰蔣闆呴粦; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2;">榪欑瘒鏂囧瓧涓昏璁ㄨsql鐨勪竴鑸紪鍐欏師鍒欍備笅涓綃囪璁烘牴鎹墽琛岃鍒掕繘琛岃皟浼樼殑璇濋銆?/div> <div style="font-family: 寰蔣闆呴粦; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2;">緗戜笂榪欑被鏂囩珷寰堝錛屼絾寰寰鍙槸緇欏嚭緇撹錛屾瘮濡傦紝榪欐牱鍐檚ql浼氭瘮閭f牱鍐檚ql鏁堢巼鏇撮珮銆傞槄璇昏呭鏋滄墦綆楁墦寮鏁版嵁搴撹嚜宸卞仛涓閬嶅疄楠岋紝鐪嬬湅鏁堢巼宸紓鍒板簳鏈夊灝戯紝闇瑕佽嚜宸遍犳暟鎹紝榪樻槸姣旇緝楹葷儲銆傝繖綃囨枃瀛椾細鎶奃DL鍜孌ML浠ュ強sql鐨勬墽琛屾椂闂撮兘鍐欏嚭鏉ワ紝涓鏂歸潰緇欎竴涓洿鐩磋鐨勫嵃璞★紝鍙︿竴鏂歸潰鏂逛究闃呰鑰呰嚜宸卞疄楠屻?/div> <div style="font-family: 寰蔣闆呴粦; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2;"></div> <div style="font-family: 寰蔣闆呴粦; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2;">浠racle涓哄疄楠岀敤鏁版嵁搴擄紝浣跨敤钁楀悕鐨別mp琛ㄣ傚畨瑁卭racle鏁版嵁搴撲箣鍚庯紝scott鐢ㄦ埛鐨勫瘑鐮佹槸tiger. 鍦ㄤ粬鐨剆chema涓嬫湁鍑犲紶sample琛紝寰堝sql鏁欑▼閮戒互榪欏嚑寮犺〃涓哄熀紜. 鎹錛岀啛鎮塷racle鏁版嵁搴撶殑浜烘彁鍒皊mith榪欎釜浜哄悕錛屽氨鑳借仈鎯寵搗sample琛ㄤ腑浠栫殑宸ヤ綔鏄痗lerk. emp琛ㄥ氨鏄痵ample琛ㄤ箣涓銆傝繖寮犺〃鍘熷鏁版嵁鍙湁14琛岋紝涓轟簡浣撶幇涓嶅悓sql鎬ц兘涓婄殑宸紓錛屾垜浠渶瑕佸濉厖涓浜涙暟鎹繘鍘匯備綔涓哄~鍏呮暟鎹殑棰勫鐭ヨ瘑錛屾垜浠彲浠ョ湅涓涓嬪浣曠敓鎴愪竴緋誨垪浠庡皬鍒板ぇ鐨刬d:<br /> <div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000FF; ">SELECT</span> ROWNUM<br /> <span style="color: #0000FF; ">FROM</span> DUAL<br /> CONNECT <span style="color: #0000FF; ">BY</span> <span style="color: #0000FF; ">LEVEL</span> <span style="color: #808080; "><</span> <span style="color: #800000; font-weight: bold; ">10000</span>;</div> <span style="font-family: monospace, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14px; white-space: pre;">濉厖闅忔満鏁版嵁鍙互鍊熷姪浜巇bms_random鍖咃紝涓嶆兂瑕嗙洊宸叉湁鐨勮〃錛屾墍浠ユ柊鍒涘緩涓涓〃緇撴瀯鍩烘湰涓鏍風殑錛?/span> <br /> <div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000FF; ">create</span> <span style="color: #0000FF; ">table</span> emp_new<br /> <span style="color: #0000FF; ">as</span><br /> <span style="color: #0000FF; ">select</span> <span style="color: #0000FF; ">level</span>                                                          empno,<br />        SYS.dbms_random.String(<span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">u</span><span style="color: #FF0000; ">'</span>, SYS.dbms_random.value(<span style="color: #800000; font-weight: bold; ">3</span>,<span style="color: #800000; font-weight: bold; ">10</span>))       ename,<br />        SYS.dbms_random.String(<span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">u</span><span style="color: #FF0000; ">'</span>, SYS.dbms_random.value(<span style="color: #800000; font-weight: bold; ">3</span>,<span style="color: #800000; font-weight: bold; ">9</span>))        job,<br />        <span style="color: #FF00FF; ">round</span>(SYS.dbms_random.value(<span style="color: #800000; font-weight: bold; ">1000</span>,<span style="color: #800000; font-weight: bold; ">9999</span>))                        mgr,<br />        TO_DATE (   <span style="color: #FF00FF; ">ROUND</span> (DBMS_RANDOM.VALUE (<span style="color: #800000; font-weight: bold; ">1</span>, <span style="color: #800000; font-weight: bold; ">28</span>))<br />                     <span style="color: #808080; ">||</span> <span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">-</span><span style="color: #FF0000; ">'</span><br />                     <span style="color: #808080; ">||</span> <span style="color: #FF00FF; ">ROUND</span> (DBMS_RANDOM.VALUE (<span style="color: #800000; font-weight: bold; ">1</span>, <span style="color: #800000; font-weight: bold; ">12</span>))<br />                     <span style="color: #808080; ">||</span> <span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">-</span><span style="color: #FF0000; ">'</span><br />                     <span style="color: #808080; ">||</span> <span style="color: #FF00FF; ">ROUND</span> (DBMS_RANDOM.VALUE (<span style="color: #800000; font-weight: bold; ">1980</span>, <span style="color: #800000; font-weight: bold; ">2012</span>)),<br />                     <span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">DD-MM-YYYY</span><span style="color: #FF0000; ">'</span><br />                    )                                                   hiredate,<br />         <span style="color: #FF00FF; ">round</span>(SYS.dbms_random.value(<span style="color: #800000; font-weight: bold; ">300</span>,<span style="color: #800000; font-weight: bold; ">9999</span>))                         sal,<br />         <span style="color: #FF00FF; ">round</span>(SYS.dbms_random.value(<span style="color: #800000; font-weight: bold; ">1</span>,<span style="color: #800000; font-weight: bold; ">6</span>)) <span style="color: #808080; ">*</span> <span style="color: #800000; font-weight: bold; ">100</span>                        comm,<br />         <span style="color: #FF00FF; ">round</span>(SYS.dbms_random.value(<span style="color: #800000; font-weight: bold; ">1</span>,<span style="color: #800000; font-weight: bold; ">4</span>)) <span style="color: #808080; ">*</span> <span style="color: #800000; font-weight: bold; ">10</span>                         deptno<br />  <span style="color: #0000FF; ">FROM</span> DUAL<br /> CONNECT <span style="color: #0000FF; ">BY</span> <span style="color: #0000FF; ">LEVEL</span> <span style="color: #808080; "><</span> <span style="color: #800000; font-weight: bold; ">1000000</span>;</div> <div number3="" index2="" alt2"="" style="color: #222222; font-family: monospace, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 1.1em !important; outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important; white-space: pre !important;"><br /> </div> <div number3="" index2="" alt2"="" style="color: #222222; font-family: monospace, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 1.1em !important; outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important; white-space: pre !important;"><span style="font-size: 14px; ">榪欓噷鏈変竴涓眬闄愶紝鍘熸湰鐨別mp琛╩gr鍒梤eference empno鍒椼備笂闈㈡柊鍒涘緩鐨別mp_new涓け鍘諱簡榪欎釜constraint. 榪欑偣鍙互浠嶰racle SQL Developer涓湅鍒般?/span></div> <div number3="" index2="" alt2"="" style="color: #222222; font-family: monospace, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 1.1em !important; outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important; white-space: pre !important;"><span style="font-size: 14px;">emp琛細<br /> <a target="_blank"><img src="http://f-1.tuzhan.com/adb507d00a2a/p-2/l/2013/03/31/09/7c29f2ddaa7d47f29535dbe8b892c36a.png" alt="with_constrant.png" border="0" /><br /> </a></span> <span style="font-size: 14px; line-height: 14px;">emp_new琛細</span> <span style="font-size: 14px;"><br /> <a target="_blank"><img src="http://f-1.tuzhan.com/33bdd567b454/p-2/l/2013/03/31/09/485143eb02104036ba1f146fb0d99375.png" alt="no_constrant.png" border="0" /></a> </span> <div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; line-height: normal; text-align: -webkit-auto; white-space: normal;"><table border="0" cellpadding="0" cellspacing="0" style="width: 402px; color: #222222; font-family: monospace, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px !important; outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; box-sizing: content-box !important; direction: ltr !important;"><tbody style="outline-width: 0px !important; outline-style: initial !important; outline-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; vertical-align: baseline !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; overflow-x: visible !important; overflow-y: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important; "><tr style="outline-width: 0px !important; outline-style: initial !important; outline-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; vertical-align: baseline !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; overflow-x: visible !important; overflow-y: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important; "><td class="code" style="word-break: break-all; outline-width: 0px !important; outline-style: initial !important; outline-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; vertical-align: baseline !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow-x: visible !important; overflow-y: visible !important; position: static !important; right: auto !important; top: auto !important; width: 402px; box-sizing: content-box !important; direction: ltr !important; "><div id="igyemqq" class="container" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: relative !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><div id="244c424" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; white-space: pre; ">涓嬮潰灝卞紑濮嬫祴璇晄ql浜嗭細</span></div><div id="2km46a4" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; white-space: pre; ">1. 鍏堟瘮杈冧竴涓嬪姞primary key鍓嶅悗鐨勭粨鏋滐細</span></div><div id="ceo2i46" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; white-space: pre; ">select * from emp_new where empno=1;</span></div><div id="sw2qkwi" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; white-space: pre; ">鍔爌rimary key constraint涔嬪墠榪愯0.023縐掋?鍔犱簡primary key constraint涔嬪悗0.001縐掋傚姞</span><span style="font-size: 14px; white-space: pre; line-height: 1.1em; ">primary key constraint鍦?00涓囨潯鏁版嵁涓婂ぇ綰﹁姳璐?縐掗挓銆?/span></div><div id="wauwsaa" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"></div><div id="2uiuo44" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">2. where瀛愬彞 vs. having瀛愬彞</span></div><div id="24wmcai" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">select deptno, avg(sal) from emp_new group by deptno having deptno != 10 and deptno != 20;</span></div><div id="64mguii" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">0.24縐?/span></div><div id="amqke46" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">select deptno, avg(sal) from emp_new where deptno != 10 and deptno != 20 group by deptno ;</span></div><div id="amoskiq" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">0.16縐?/span></div><div id="4644as4" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">鎵浠aving涓殑鏉′歡涓鑸敤浜庡涓浜涢泦鍚堝嚱鏁扮殑姣旇緝錛屽count()絳夛紝闄ゆ涔嬪錛屼竴鑸潯浠跺簲璇ュ啓鍦╳here瀛愬彞涓?/span></div><div id="i22mw44" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; "><br /></span></div><div id="ekuga24" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">3. 鍑忓皯瀵硅〃鐨勬煡璇?/span></div><div id="62su244" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">update emp_new set sal=(select max(sal) from emp_new), comm=(select max(comm) from emp_new) where empno=1237;</span></div><div id="mc4icka" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">0.11縐掑乏鍙?/span></div><div id="m24o42y" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">update emp_new set (sal, comm) =(select max(sal), max(comm) from emp_new) where empno=1224;</span></div><div id="mic4426" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">0.07縐掑埌0.08縐掍箣闂?/span></div><div id="s244saq" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; "><br /></span></div><div id="q6cm424" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">娉ㄦ剰錛氫互涓婁笁涓祴璇曢兘鍙猣etch鍓?0鏉℃暟鎹?/span></div><div id="6qksiow" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; "><br /></span></div><div id="2eq4e4a" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">4. 浼犺涓敤exists鏇夸唬in閫氬父鍙彁楂樻煡璇㈡晥鐜囷紝 not exists 涔熸瘮not in 蹇?br />鍏堢敓鎴恉ept_new琛細<br /></span><div style="background-color: #eeeeee; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">create</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">table</span><span style="color: #000000; "> dept_new<br /></span><span style="color: #0000FF; ">as</span><span style="color: #000000; "><br /></span><span style="color: #0000FF; ">select</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">level</span><span style="color: #000000; ">                                                          deptno,<br />       SYS.dbms_random.String(</span><span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">u</span><span style="color: #FF0000; ">'</span><span style="color: #000000; ">, SYS.dbms_random.value(</span><span style="color: #800000; font-weight: bold; ">3</span><span style="color: #000000; ">,</span><span style="color: #800000; font-weight: bold; ">10</span><span style="color: #000000; ">))       dname,<br />       SYS.dbms_random.String(</span><span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">u</span><span style="color: #FF0000; ">'</span><span style="color: #000000; ">, SYS.dbms_random.value(</span><span style="color: #800000; font-weight: bold; ">3</span><span style="color: #000000; ">,</span><span style="color: #800000; font-weight: bold; ">9</span><span style="color: #000000; ">))        loc<br /></span><span style="color: #0000FF; ">FROM</span><span style="color: #000000; "> DUAL<br />CONNECT </span><span style="color: #0000FF; ">BY</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">LEVEL</span><span style="color: #000000; "> </span><span style="color: #808080; "><</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">10000</span><span style="color: #000000; ">;</span></div></div><div id="i6m244y" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">瀹為檯嫻嬭瘯涓紝鏃犺鏄墽琛岃鍒掕繕鏄疄闄呮祴璇曠殑閫熷害閮芥槸鍩烘湰涓鑷寸殑銆?/span></div><div id="ioiousa" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">絎竴緇?/span></div><div id="224m4o4" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; ">select * from emp_new e where e.empno > 986000 and e.deptno in (select d.deptno from dept_new d where d.loc='AYDN') select * from emp_new e where empno > 986000 and exists (select * from dept_new d where d.deptno = e.deptno and d.loc='AYDN') 絎簩緇? select e.empno from emp_new e where e.empno > 996000 and not exists (select 1 from dept_new d where d.deptno = e.deptno and loc like 'A%') select e.empno from emp_new e where e.empno > 996000 and e.deptno not in (select d.deptno from dept_new d where loc like 'A%')</span></div><div id="ocwk4g4" class="line number3 index2 alt2" style="outline: 0px !important; border: 0px !important; vertical-align: baseline !important; margin: 0px !important; padding: 2px 1em 2px 0em !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; width: auto !important; box-sizing: content-box !important; direction: ltr !important;"><span style="font-size: 14px; line-height: 15px; white-space: pre; "><br /></span></div></div></td></tr></tbody></table></div><div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; line-height: normal; text-align: -webkit-auto; white-space: normal;"></div><div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; line-height: normal; text-align: -webkit-auto; white-space: normal;">榪欑瘒鏂囧瓧涓昏鍙傝冧袱綃囨枃绔狅細</div><div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; line-height: normal; text-align: -webkit-auto; white-space: normal;">Generating Random Data in<a href="file:///C:/Users/Chuyang/AppData/Local/youdao/ynote/editor/web/Oracle%EF%BC%9Ahttp://viralpatel.net/blogs/generating-random-data-in-oracle/" style="cursor: pointer; "> Oracle錛歨ttp://viralpatel.net/blogs/generating-random-data-in-oracle/</a></div><div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; line-height: normal; text-align: -webkit-auto; white-space: normal;">Oracle sql  鎬ц兘浼樺寲璋冩暣錛?a href="file:///C:/Users/Chuyang/AppData/Local/youdao/ynote/editor/web/&nbsp;http://wenku.baidu.com/view/571cddd4195f312b3169a507" style="cursor: pointer; "> http://wenku.baidu.com/view/571cddd4195f312b3169a507</a> </div> <span style="font-size: 14px;"><br /> <br /> <br /> <br /> </span></div> </div><img src ="http://m.tkk7.com/vcycyv/aggbug/397206.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2013-03-31 21:49 <a href="http://m.tkk7.com/vcycyv/archive/2013/03/31/397206.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鑷綍performance tuning, jvm, visualvm瑙嗛(鏇存柊錛氬凡鍙戦佽棰戣嚦浼橀叿)http://m.tkk7.com/vcycyv/archive/2012/08/24/386164.html浜哄湪姹熸箹浜哄湪姹熸箹Fri, 24 Aug 2012 00:30:00 GMThttp://m.tkk7.com/vcycyv/archive/2012/08/24/386164.htmlhttp://m.tkk7.com/vcycyv/comments/386164.htmlhttp://m.tkk7.com/vcycyv/archive/2012/08/24/386164.html#Feedback12http://m.tkk7.com/vcycyv/comments/commentRss/386164.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/386164.htmlvisualvm鏄疭un JDK鑷甫鐨凧ava profiling鐨勫伐鍏楓傝嚜宸卞綍浜嗕竴涓棰?35鍒嗛挓錛岀畝鍗曠殑浠嬬粛浜唒erformance tuning鐨刲ifecycle, jvm鐨勪竴鐐圭偣鐞嗚錛屼互鍙妚isualvm鐨勬搷浣滐細瀹氫綅姝婚攣錛屾煡鐪媜ut of memory, 瀹氫綅榪愯緙撴參鐨刴ethod.

 

瑙嗛鏂囦歡鍦細https://docs.google.com/open?id=0B22ayLe4teeYQm56QnhaWkUxM2s

ppt鍦細https://docs.google.com/open?id=0B22ayLe4teeYdEhsMkItTk16UDg

鏈変漢璇磄oogle drive涓婁笉瀹規槗涓嬭澆澶ф枃浠訛紝寤鴻鍘嬬緝涓涓嬶紝浣嗘槸鎴戜笉澶細鐢ㄨ棰戝帇緙╄蔣浠訛紝鍘嬭繃涔嬪悗鏁堟灉涓嶅ソ浜嗭紝鍊掓槸涔熻兘灝嗗氨鐫鐪嬶細

https://docs.google.com/open?id=0B22ayLe4teeYY1pvNlVtSWdUOVU

鎴戠殑澹伴煶灝卞儚姊︽父涓鏍鳳細http://v.youku.com/v_show/id_XNDQ1Nzk0NDYw.html
 

 



]]>
鎬葷粨Java鐨凣enericshttp://m.tkk7.com/vcycyv/archive/2012/08/20/385803.html浜哄湪姹熸箹浜哄湪姹熸箹Mon, 20 Aug 2012 00:13:00 GMThttp://m.tkk7.com/vcycyv/archive/2012/08/20/385803.htmlhttp://m.tkk7.com/vcycyv/comments/385803.htmlhttp://m.tkk7.com/vcycyv/archive/2012/08/20/385803.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/385803.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/385803.html闃呰鍏ㄦ枃

]]>
鍙戠幇thinking in java 4th edition鐨勪竴涓敊璇?/title><link>http://m.tkk7.com/vcycyv/archive/2012/07/30/384290.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Mon, 30 Jul 2012 02:30:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2012/07/30/384290.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/384290.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2012/07/30/384290.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/384290.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/384290.html</trackback:ping><description><![CDATA[     鎽樿: thinking in java鐪嬩簡宸笉澶氭湁5錛?閬嶏紝浣嗘槸涔嬪墠鏈変簺绔犺妭鐪嬪緱涓嶄粩緇嗐傛渶榪戞湁鎰熶簬鑷繁鎶鏈殑涓嶆墡瀹烇紝寮濮嬮噸鐪媡hinking in java, 鍙戠幇浜嗕功涓殑涓涓敊璇紝鍦ㄥ師涔︾殑491欏點?  1: //: generics/Wildcards.java 2: // Exploring the meaning of wildcards. 3:  4:...  <a href='http://m.tkk7.com/vcycyv/archive/2012/07/30/384290.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/vcycyv/aggbug/384290.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2012-07-30 10:30 <a href="http://m.tkk7.com/vcycyv/archive/2012/07/30/384290.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>remove element without causing ConcurrentModificationException & i18n number input solution & 鍏嶈垂褰曞睆杞歡http://m.tkk7.com/vcycyv/archive/2012/06/23/381353.html浜哄湪姹熸箹浜哄湪姹熸箹Sat, 23 Jun 2012 08:28:00 GMThttp://m.tkk7.com/vcycyv/archive/2012/06/23/381353.htmlhttp://m.tkk7.com/vcycyv/comments/381353.htmlhttp://m.tkk7.com/vcycyv/archive/2012/06/23/381353.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/381353.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/381353.html
List<String> names = .
Iterator<String> i = names.iterator();
while (i.hasNext()) {
   // Do something
   i.remove();
}

Note that you must call i.next() before you can call i.remove()

2. 娉曡錛屽痙璇腑鏁板瓧灝忔暟鐐圭敤,琛ㄧず錛屽崈浣嶇鏄?." 濡傛灉鍋氭敮鎸両18n鐨刄I錛?闇瑕佹樉紺烘暟瀛楀茍鎺ュ彈浠栦滑杈撳叆鐨勬暟瀛?鍙互榪欐牱鍋氾細
    public static void main(String[] args) throws ParseException{
        String numString = "0.05";
        String frenchNumString = "0,05";
        NumberFormat nf = NumberFormat.getNumberInstance();
        System.out.println("French format of raw string: " + nf.format(Double.parseDouble(numString)));
        
        Double n = (Double) nf.parse(frenchNumString);
        System.out.println("Parse french number and calculate: " + (n + 1));
    }

3. 鍏嶈垂鐨勫綍灞忚蔣浠訛細HyperCam 



]]>
寰敼榪涚増DAV Explorer鍜屾帹鑽愬嚑涓ソ鐪嬬殑瑙嗛http://m.tkk7.com/vcycyv/archive/2012/04/16/374702.html浜哄湪姹熸箹浜哄湪姹熸箹Mon, 16 Apr 2012 00:45:00 GMThttp://m.tkk7.com/vcycyv/archive/2012/04/16/374702.htmlhttp://m.tkk7.com/vcycyv/comments/374702.htmlhttp://m.tkk7.com/vcycyv/archive/2012/04/16/374702.html#Feedback5http://m.tkk7.com/vcycyv/comments/commentRss/374702.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/374702.htmlWeb Dav鏄竴縐嶅彲浠ュ湪涓婇潰璇誨啓鏂囦歡鐨剋eb server. 鏀寔鍔犻攣錛岃В閿併傝繕鏀寔鐗堟湰鎺у埗銆傛爲鐘剁粨鏋勶紝鍙互鍦ㄤ笂闈㈠瓨鍌ㄩ敭鍊煎銆?/p>

綆$悊Web Dav涓鑸敤Dav Explorer錛屽畠鏄紑婧愮殑. 騫蟲椂鐢―av Explorer鐨勬椂鍊欐湁涓ょ偣鏈変簺涓嶇埥銆?/p>

絎竴錛屽畠涓嶈兘綆$悊涓枃錛堥潪鑻辨枃錛夌洰褰曪紝浠ヨ嚦浜庢墍鏈夊瓙鐩綍涔熶笉鑳介氳繃榪欎釜宸ュ叿璁塊棶

絎簩錛屽畠涓嶈兘淇濆瓨瀵嗙爜錛屽鉤鏃跺伐浣滄椂甯歌繛涓嶅悓鏈哄櫒錛屽ぉ澶╄緭鍏ュ瘑鐮併?/p>

鏈榪戞敼浜嗕竴浜涘畠鐨勪唬鐮侊紝榪欎袱涓棶棰橀兘瑙e喅浜嗐?/p>

瑙e喅涓枃鐩綍闂錛屼富瑕佹槸閫氳繃commons-httpclient.jar鍖呴噷鐨刄RIUtil.encodePath錛屽畠鑳界洿鎺ncode瀹屾暣鐨刪ttp url, 鑰屼笉鍍廢RLEncoder鍙兘encode url鐨勬枃浠墮儴鍒嗭紙http://浠ュ強鍓嶉潰鐨刢ontext path涓嶈兘鐩存帴鐢║RLEncoder鏉ncode錛?/p>

瑙e喅淇濆瓨瀵嗙爜鐨勯棶棰樹富瑕佹槸閫氳繃Java鐨凱references.

鏀硅繘鍚庣殑Dav Explorer鍙互鍦ㄦ垜鐨勭綉鐩樹笅杞斤細http://115.com/file/c2k7519k#DAVExplorer-chuyang.zzip 涓嬭澆涔嬪悗鍚庣紑鍚嶈鏀規垚.zip. jar鍖呴噷鍖呭惈婧愪唬鐮併?/p>

 

鏈榪戠湅婕旇瑙嗛緇冧範鑻辮鍚姏錛岀湅鍒頒竴浜涘鑷繁寰堟湁瑙﹀姩鐨勬帹鑽愪竴涓嬶紝澶у鏈夊暐鎺?鑽愮殑涔熻涓涓嬶紒
1.  TED婕旇錛岃剢寮辯殑鍔涢噺錛岃繖鏄叧浜庡浣曞仛鍒板叏蹇冨叏鍔涳紙whole-hearted錛夌敓媧葷殑 婕旇錛屽綋鏃跺弽澶嶇湅浜嗕笁閬嶏紝甯︾粰鑷繁寰堝鎬濊冦?
http://www.en8848.com.cn/tingli/speech/ted/148318.html


2. 鑻規灉UI浜や簰璁捐甯堢殑婕旇錛屼富棰樺彨Inventing on Principle錛屾湡闂寸殑婕旂ず浠や漢 鍙逛負瑙傛錛屼粬鐨勬濇兂涔熻愪漢瀵誨懗銆?
http://coolshell.cn/articles/6775.html


3. 濂ュ反椹氨鑱屾紨璇達紝姘斿満榪樼湡鏄己澶с?
http://v.ku6.com/show/2XDTp_25OOYOJC1u.html


4. Yang Xu鍦ㄨ繖涓猙bs鎺ㄨ崘榪囷紝Randy Pausch鐨勬渶鍚庝竴璇撅紝鍊煎緱鎰熷彈涓涓嬩粬鐨勪漢鐢?鎬佸害錛岄渿鎾箋傜湅鍒扮敓鏃ヨ泲緋曢偅鍧楀効鐨勬椂鍊欏揩鍝簡閮姐?
鏈鍠滄鐨勪竴孌佃瘽錛歍he brick walls are there to give us a chance to show how badly we want something. Because the brick walls are there to stop the people who don't want it badly enough. They are there to stop the other people.
http://v.youku.com/v_show/id_XMjQ3MTUzNDI4.html


5. 涔斿竷鏂柉鍧︾婕旇錛岃繖涓お鍑哄悕浜嗭紝涓嶈浜嗐?
http://www.tudou.com/programs/view/dS0wNIaiWT4/


鍙戠幇TED鏄緢濂界殑瑙嗛婕旇璧勬簮錛孴ED鎸噒echnology, entertainment, design錛屽彲 浠ュ湪浼橀叿鎼溾淭ED婕旇闆嗏濓紝鏈榪戠湅浜嗘帴榪?0涓紝寰堝婕旇鏅烘収鑰屽菇榛樸?



]]>
鍋囧鎴戞槸CTOhttp://m.tkk7.com/vcycyv/archive/2011/08/01/355469.html浜哄湪姹熸箹浜哄湪姹熸箹Mon, 01 Aug 2011 00:25:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/08/01/355469.htmlhttp://m.tkk7.com/vcycyv/comments/355469.htmlhttp://m.tkk7.com/vcycyv/archive/2011/08/01/355469.html#Feedback6http://m.tkk7.com/vcycyv/comments/commentRss/355469.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/355469.html榪欒緢瀛愭曟槸娌℃満浼氬綋CTO浜嗭紝鍙兘鍋囧涓涓嬩簡銆侰TO鐨勪富瑕佽亴璐f槸浜嗚В褰撳墠嫻佽鐨勬妧鏈茍鏈夊墠鐬繪у湴璁懼畾鎶鏈垬鐣ワ紱棰勫厛鎰熺煡鏈潵鐨勬妧鏈彂灞曟柟鍚戯紝淇濇寔甯傚満绔炰簤涓妧鏈緝涓洪鍏堢殑鍦頒綅錛岃繖縐嶉鍏堝簲璇ユ槸鍙互杞寲涓哄晢涓氫環鍊肩殑銆侰TO鍙互寰堝ぇ紼嬪害涓婂乏鍙蟲妧鏈瀷鍏徃鐨勫懡榪愶紝濡傛灉浣滃嚭姝g‘鐨勬妧鏈喅絳栵紝灝辮兘鍦ㄧ珵浜変腑鐗電潃瀵規墜榧誨瓙璧幫紝鎴愪負娓告垙瑙勫垯鐨勫埗瀹氳咃紱涓鏃﹀仛閿欏喅絳栵紝鍙兘鎺ヤ笅鏉ュ嚑騫村叕鍙稿湪鎶鏈笂鐨勬姇鍏ラ兘瑕佸寲涓烘場褰憋紝嫻垂澶ч噺浜哄姏璐㈠姏銆?/p>

鍟嗕笟鍏徃榪芥眰鏈澶у寲鍟嗕笟鍒╂鼎錛孋TO搴旇鑳藉鎰熺煡鍏徃鎵澶勭殑涓氬姟甯傚満鐨勫墠鏅紝濡傛灉鏁翠釜甯傚満澶勪簬钀庣緝鐘舵侊紝鍏徃闅句繚鐙杽鍏惰韓錛屾墍浠TO鈥濇渶鎬曞叆閿欒"錛孋TO鏈夎矗浠誨嬀鐢誨叕鍙告湭鏉ョ殑鎶鏈摑鍥撅紝騫朵笖浠栬繕搴旇鎳傚競鍦? 鎴戝亣鎯矷BM褰撳垵浠庤蔣浠惰漿鍚戞湇鍔★紝鑳屽悗鐨勬帹鎵嬪簲璇ユ槸CTO, 鍗充嬌寰堝鎿嶄綔鏄敱CEO鏉ュ仛錛屾湁鍓嶇灮鎬у湴鎻愬嚭杞瀷鐨勪漢搴旇鏄疌TO錛屽洜涓轟粬浜嗚В鎶鏈墠鏅紝鎴栬呰錛屼粬浜嗚В鏌愪簺鏂歸潰鐨勬妧鏈槸鍚﹀湪鏈潵鏈夊競鍦恒?/p>

鏁翠釜杞歡琛屼笟閮藉湪嫻佽鏀惰喘錛屼絾鏈鍒濆潥瀹氳蛋鏀惰喘閬撹礬鐨勫厛椹卞茍涓嶈兘寰楀埌騫挎硾鐨勭悊瑙e拰璁ゅ彲銆傚騫翠互鍓嶏紝oracle寮濮嬪睍鐜版敹璐垬鐣ョ殑鏃跺欙紝浠栫殑瀵規墜SAP鏈変簺鎻舵弰鎰忓懗鍦幫紝閽堥攱鐩稿鎻愬嚭鈥渙rganic grow鈥? 渚濋潬鑷韓鎴愰暱銆傜粨鏋溾滄垚闀庫濅簡鍑犲勾鍙戠幇榪樻槸瀵規墜渚濋潬鏀惰喘鎵╁紶寰楁洿蹇紝鎵嶅紑濮嬭窡鐫鑺遍挶鏀惰喘錛屼粠榪欎釜瑙掑害璇達紝SAP鍦ㄦ垬鐣ヤ笂宸茬粡鍏堣緭涓鎷涘効浜嗐傛敹璐垬鐣ユ垨璁告槸Larry Ellison鐨勭伒鍏変竴鐜幫紝鍏蜂綋鎵╁厖鍝簺鏂歸潰鐨勫競鍦猴紝閫夋嫨鍝簺鎶鏈鍏堢殑瀵規墜榪涜鏀惰喘錛屾敹璐箣鍚庣殑鏁村悎瑙勫垝錛岃繖浜涘簲璇ラ兘灞炰簬CTO鐨勮亴璐h寖鍥淬備笉榪囧氨Oracle榪欎釜渚嬪瓙錛孡arry鐨勬妧鏈梾瑙夊彲鑳藉凡緇忚揪鍒扮寧鐙楁按鍑嗕簡銆?/p>

闅忕潃寮婧愯秺鏉ヨ秺鐩涜錛屾妧鏈篃瓚婃潵瓚婂懼悜浜庡紑鏀俱傚湪寮婧愮洓琛屼箣鍓嶏紝姣忎釜鍏徃錛屾棤璁哄ぇ灝忥紝閮芥湁鑷繁鐨勬妧鏈鏋躲傚彂甯冪殑鍚勪釜浜у搧閮芥灦鏋勫湪榪欎釜妗嗘灦涔嬩笂銆傚悗鏉ュ嚭鐜頒簡涓嶅悓鏂歸潰鐨勫紑婧愭妧鏈鏋訛紝姣斿spring, hibernate, 鍚勭MVC妗嗘灦錛孋TO搴旇鐩存帴棰嗗鍥㈤槦瀵規綔鍦ㄥ彲鑳藉惛鏀剁殑鏂版妧鏈繘琛岃瘎浼般傝繖浜涘紑婧愮殑鎶鏈線寰鏇翠紭縐錛屽洜涓烘柊鎶鏈線寰鍚告敹浜嗗凡鏈夋妧鏈殑綺懼崕騫跺姞浠ユ敼榪涳紝鍙﹀錛屽紑婧愭妧鏈湁騫挎硾鐨勭敤鎴風兢楠岃瘉騫跺府鍔╀紭鍖栥備絾鍚屾椂錛屾妧鏈紭縐涓嶈〃紺烘垚鐔燂紝鍏徃閲岄渶瑕佹湁涓撻棬鐨勫洟闃熻瘎浼板摢縐嶆妧鏈彲浠ュ湪浠涔堟椂鍊欏彲浠ユ浛浠e叕鍙稿凡鏈夌殑鎶鏈?/strong> 榪欑閫夋嫨搴旇鍊懼悜浜庝繚瀹堬紝瀹佸彲鐣ュ井鎱竴鐐癸紝涔熶笉鑳藉啋榪涘仛閿欐妧鏈夊瀷銆傛瘮濡俧lex鍜宧tml5鍦ㄤ笁騫翠箣鍓嶆瘮杈冿紝涓嶅お瀹規槗鐪嬪嚭鍝鎶鏈湁鏇村ソ鐨勫墠鏅傛垜涓漢瑙夊緱鐜板湪姣旇緝榪欎袱縐嶆妧鏈殑璇濓紝html5鐨勪紭鍔挎槑鏄炬洿澶т竴浜涗簡銆傚紑鏀劇殑鎶鏈惛寮曟洿澶氱殑鎶鏈媯鐑呮帹鍔ㄥ茍瀹屽杽瀹冿紝html5浼間箮瓚婃潵瓚婂ソ鐢ㄤ簡銆傛妧鏈夊瀷鐨勫喅絳栭渶瑕佸鎱庡湴鎱㈡參鍋氾紝浣嗕竴鏃﹀喅絳栧畬鎴愶紝灝辮闆峰帀椋庤鎵ц鍐崇瓥銆傚鏋滃叕鍙稿凡緇忔湁鍗佷釜浜у搧鍩轟簬鑰佹鏋跺紑鍙戯紝閭d箞涓嶆ヤ簬鐢ㄦ柊妗嗘灦鏇夸唬鑰佹鏋墮噸鏂頒慨鏀硅佷駭鍝侊紝姣曠珶鍟嗕笟浜у搧鏈緇堢洰鐨勬槸涓轟簡鍗栭挶錛岃屼笉鏄拷姹傚畬緹庢妧鏈?/strong>鏇存浛宸叉湁浜у搧妗嗘灦鏃犺皳鍦板紩鍏ラ闄┿備絾鏄浜庢柊浜у搧錛屽氨瑕佸潥瀹氫笉縐誨湴浣跨敤緇忚繃璇勪及鐨勬柊鎶鏈紝濡傛灉鍏徃鑼冨洿閲岋紝鏈変笉鍚岀殑鏂拌佹妧鏈鏋訛紝緇存姢璧鋒潵鐨勭‘鏈夋牸澶栫殑鎴愭湰錛屼絾姝誨畧鑰佹妧鏈偗瀹氭槸姝昏礬涓鏉°?strong>CTO鍋氭妧鏈喅瀹氱殑鏃跺欙紝闇瑕佹妸鍚勪釜鏂歸潰鐨勮冭檻鍐欐垚鏂囨。錛岃涓綰挎妧鏈漢鍛樹簡瑙f妧鏈喅絳栫殑鑳屾櫙銆備笂闈㈢敤flex鍜宧tml5涓句緥錛屽茍璁や負CTO搴旇璁╀竴綰挎妧鏈漢鍛樹簡瑙f妧鏈喅絳栬儗鏅紝鍘熷洜灝卞湪浜庢垜鎵鍦ㄧ殑鍏徃涓鐩村湪鎺ㄨflex錛岃屾垜涓鐩寸枒鎯戣繖涓喅瀹氭槸鎬庝箞鍋氬嚭鏉ョ殑錛岃儗鍚庣殑渚濇嵁鏄粈涔堛?/p>

鎼炲垱鏂版х殑鎶鏈紝鐢寵涓撳埄褰撶劧濂斤紝榪欎釜娌″暐鍙鐨勩?娌℃湁涓鐩磋拷韙柊鎶鏈紝鍐典笖鏈榪戝嚑涓湀鍦ㄥ鏁板錛岀粺璁★紝sas涔嬬被璺焜ava娌″暐鍏崇郴鐨勬妧鏈? 鍙槸涔辮皥涓涓嬪鎶鏈殑鐪嬫硶錛宩ava鏂歸潰涓漢鐪嬪ソ鐨勬妧鏈寘鎷紝

Spring 鈥斺?瀹冪殑瀵規墜鏄疛Boss seam, seam褰撶劧涔熷煎緱鍏蟲敞銆傚湪涔嬪墠鐨勫崥瀹㈣璁篋omain Driven Design鐨勬椂鍊欒榪囷紝騫朵笉鍠滄Spring鎵鏈夋柟闈紝灝ゅ叾瀹冭窡DDD鐨勬濊礬鏈夌浉鎮栫殑鍦版柟銆備絾Spring宸茬粡鎴愪負涓涓祦琛屽鉤鍙幫紝瀹冨お嫻佽浜嗭紝鎵浠ュ悇璺笓瀹跺ソ鎵嬮兘浼氬湪瀹冪殑鍩虹涓婂府鍔╂敼榪汼pring. 榪濪DD鐞嗚鐨勫垱寤鴻匛ric Evans閮借瑕佹妸DDD鐨勬濇兂甯﹀叆Spring涓紝榪欏氨鏄緳澶寸殑浼樺娍銆傚叕鍙歌窡榪汼pring鐨勬妧鏈闄╁皬銆係pring Roo鏄釜鏍煎鍊煎緱鍏蟲敞鐨勯」鐩?/p>

AspectJ 鈥斺?AspectJ鍙互鏀拺鎶鏈鏋訛紝浣嗘槸涓嶉傚悎澶ч噺鐢ㄥ湪搴旂敤灞傞潰鐨勭▼搴忛噷銆?/p>

OSGI 鈥斺?鍏跺疄涓嶅お浜嗚ВOSGI錛屼絾浠栫湅璧鋒潵姣旇緝瀹規槗鎴愪負鏍囧噯

Groovy 鈥斺?寰堝浜哄湪璁ㄨ璋佸彲浠ユ浛浠ava錛?ruby, scala, phython榪樻槸groovy銆傛垜涓漢涓嶈寰椾粈涔堣兘鏇夸唬java銆傛í鍚戞瘮杈冭繖鍑犱釜鎶鏈紝姣旇緝鐪嬪ソgroovy, 鍥犱負瀹冩槸java鐨勪翰鎴氾紝 鑳借嚜鐒跺湴澶嶇敤java鎴愮啛鐨勪駭鍝佸簲鐢紝鎵浠ュ畠澶╃敓灝辨湁鈥滄垚鐔熲濈殑鍥犲瓙銆備漢浠線寰鐪嬮噸蹇熷紑鍙戠殑鐗規э紝鑰屾垜瑙夊緱錛屾敮鎸佸簳灞傚紑鍙戝拰鏄撶淮鎶ゆф墠鏇撮傚悎浼佷笟綰у紑鍙戝簲鐢ㄣ?/p>

]]>
java serializable錛堣漿錛?/title><link>http://m.tkk7.com/vcycyv/archive/2011/02/23/345019.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Wed, 23 Feb 2011 15:15:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/02/23/345019.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/345019.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/02/23/345019.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/345019.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/345019.html</trackback:ping><description><![CDATA[     鎽樿: 榪欑瘒鍖呭惈涓夌瘒鏂囩珷鐨勮漿杞藉拰鎽樻妱涓孌礶ffective java鐨刢ode 絎竴綃囪漿杞? 澶у閮界煡閬揝erializable鏄竴涓猰ark interface,鍛婅瘔JVM榪欎釜瀵硅薄鍙互琚漿鎹㈡垚浜岃繘鍒舵祦鏉ヤ紶杈?浣嗘槸Serializable涓嶦xternalizable鐨勮漿鎹簩榪涘埗嫻佺殑榪囩▼鏄笉涓鏍風殑.Serializable 鍦ㄦ垜浠疄鐜拌繖涓帴鍙g殑鏃跺?鎴戜滑鍙互浣跨敤4涓鏈夋柟娉曟潵鎺у埗搴忓垪鍖栫殑榪囩▼: ...  <a href='http://m.tkk7.com/vcycyv/archive/2011/02/23/345019.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/vcycyv/aggbug/345019.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-02-23 23:15 <a href="http://m.tkk7.com/vcycyv/archive/2011/02/23/345019.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎬葷粨java鐨別xceptionhttp://m.tkk7.com/vcycyv/archive/2011/02/22/344791.html浜哄湪姹熸箹浜哄湪姹熸箹Mon, 21 Feb 2011 16:12:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/02/22/344791.htmlhttp://m.tkk7.com/vcycyv/comments/344791.htmlhttp://m.tkk7.com/vcycyv/archive/2011/02/22/344791.html#Feedback5http://m.tkk7.com/vcycyv/comments/commentRss/344791.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/344791.html榪欑瘒鍜屽墠闈㈢殑 鎬葷粨java鐨刬nterface鍜宎bstract class 涓鏍楓傝煩榪囨渶鍩虹璇硶涓嶈亰錛屽彧璇翠竴浜涙瘮杈僼ricky鐨勪笢瑗垮拰涓浜涘ソ鐨刾ractice.

 

璇硶錛?/strong>

Exception緇ф壙鑷猅hrowable. Throwable榪樻湁涓涓効瀛愭槸Error,浣嗘槸涓鑸敤涓嶅埌銆備笉榪囨湁浜涗簩鐧句簲闈㈣瘯瀹樺枩嬈㈤棶鍥炲瓧鏈夊嚑縐嶅啓娉曪紝鎵浠ヨ繕鏄鐭ラ亾鏈塃rror榪欏洖浜嬬殑銆侲xception鍒嗕負checked鍜寀nchecked涓ょ銆?

 

java鐨刢hecked exception涓鐩存槸涓緢鏈変簤璁殑涓滆タ銆俆hinking in Java鐨勪綔鑰匓ruce, C#鐨勮璁¤呭拰Martin Fowler閮藉checked exception鎸佽川鐤戞佸害銆?涓涓吀鍨嬬殑鍙嶅鐞嗙敱鏄細"We felt it was unrealistic to require the programmer to provide handlers in situations where no meaningful action can be taken." 榪欒瘽澶疄鎯犱簡銆傚啓鏂規硶緇檆aller璋冪敤錛屾庝箞鑳絤agically鐭ラ亾璋冪敤榪欎釜鏂規硶鐨?strong>鎵鏈?/strong>caller錛岃兘澶熷鐞嗙壒瀹氱殑寮傚父鍛紵

 

鍏充簬Exception鏈変釜姣旇緝鍩烘湰鐨勮娉曟槸錛屽瓙綾籵verride鐨勬柟娉曞鏋滃0鏄庢姏鍑篹xception, 鍙兘鎶涘嚭鐖舵柟娉曞0鏄庣殑exception錛屾垨鑰呴偅涓猠xception鐨勫瓙綾匯傞渶瑕佹敞鎰忕殑鏄紝“鍥?#8221;瀛楄繕鏈変竴縐嶅啓娉曪紝瀵逛簬constructor鏉ヨ娌℃湁榪欎釜闄愬埗錛屽瓙綾誨彲浠ユ姏鍑轟換鎰廵xception銆傜埗綾繪瀯閫犲嚱鏁板0鏄庣殑exception,瀛愮被涔熷繀欏誨0鏄庯紝鑰屼笖瀛愮被鐨勬瀯閫犲嚱鏁頒笉鑳芥崟鎹夌埗綾誨0鏄庣殑exception. 榪欎釜鎯蟲兂涔熷鏄撶悊瑙o紝鐖剁被鏋勯犲嚭閿欎簡錛屽効瀛愬眳鐒惰兘澶勭悊榪樻妸鑷繁鐢熷嚭鏉ヤ簡錛屾病鑰佸瓙鍝潵鐨勫効瀛愶紵褰撶劧浣犲彲浠ユ姮鏉犺鑰佸瓙鎴寸豢甯藉瓙鐨勬儏鍐點?

 

瀹炶返錛?/strong>

1. 灝介噺涓嶈鍦ㄦ瀯閫犲嚱鏁伴噷鍋氬鏉傜殑鎿嶄綔錛屽敖閲忎笉瑕佽constructor鎶涘嚭exception銆傚鏋滃湪鏋勯犲嚱鏁伴噷鎶涘嚭exception,闇瑕佺敤nested try block. 濡備笅錛?/p>

   1: public class Cleanup { 
   2:   public static void main(String[] args) { 
   3:     try { 
   4:       InputFile in = new InputFile("Cleanup.java"); 
   5:       try { 
   6:         String s; 
   7:         int i = 1; 
   8:         while((s = in.getLine()) != null) 
   9:           ; // Perform line-by-line processing here... 
  10:       } catch(Exception e) { 
  11:         System.out.println("Caught Exception in main"); 
  12:         e.printStackTrace(System.out); 
  13:       } finally { 
  14:         in.dispose(); 
  15:       } 
  16:     } catch(Exception e) { 
  17:       System.out.println("InputFile construction failed"); 
  18:     } 
  19:   } 
  20: } 

鑰屼笉鏄敤finally鏉ュ仛娓呯悊宸ヤ綔銆?/p>

 

2. exception鐨勪竴涓熀鏈嬌鐢ㄥ師鍒欐槸錛宔xception涓嶆槸璁捐鐢ㄦ潵鎺у埗紼嬪簭flow鐨勩?榪欐槸寰堢畝鍗曠殑閬撶悊錛岃繕鏄紩鐢╡ffective java鐨勪竴涓緥瀛愬惂

   1: // Horrible abuse of exceptions. Don't ever do this!
   2: try {
   3: int i = 0;
   4: while(true)
   5: range[i++].climb();
   6: } catch(ArrayIndexOutOfBoundsException e) {
   7: }

鎴戠湡姝h璇存槑鐨勬槸錛屼笂闈㈣鐨勫師鍒欏緢瀵癸紝浣嗘槸璧板埌鏋佺灝變笉瀵逛簡銆傛湁鐨勪漢涓轟簡 涓嶇敤exception鎺у埗紼嬪簭flow, 灝卞啓涓澶у爢鐨刬f…else璇彞璇曞浘鑰冭檻鍚勭鎯呭喌錛屾濂藉墠涓嶄箙鏈夊悓浜嬭浜嗕釜絎戣瘽錛屾垜瑙夊緱鍙互杈呭姪瑙i噴榪欎釜闂銆?/p>

=============================

鏌愭棩,鑰佸笀鍦ㄨ鍫備笂鎯寵冭冨鐢熶滑鐨勬櫤鍟?灝遍棶涓涓敺瀛?#8220;鏍戜笂鏈夊崄鍙笩,寮鏋墦姝諱竴鍙?榪樺墿鍑犲彧?”

鐢峰鍙嶉棶“鏄棤澹版墜鏋紝榪樻槸鍏朵粬娌℃湁澹伴煶鐨勬灙涔?”

“涓嶆槸銆?#8221;

“鏋0鏈夊澶?”

“80~100鍒嗚礉銆?#8221;

“閭e氨鏄浼氶渿鐨勮蟲湹鐤?”

“鏄?#8221;

“鍦ㄨ繖涓煄甯傞噷鎵撻笩鐘笉鐘硶?”

“涓嶇姱銆?#8221;

“鎮ㄧ‘瀹氶偅鍙笩鐪熺殑琚墦姝誨暒?”

“紜畾.”鑰佸笀宸茬粡涓嶈愮儲浜?”鎷滄墭,浣犲憡璇夋垜榪樺墿鍑犲彧灝辮浜?OK?”

“OK.楦熼噷鏈夋病鏈夎亱瀛?”

“娌℃湁銆?#8221;

“鏈夋病鏈夐笩鏅哄姏鏈夐棶棰橈紝鍛嗗偦鍒板惉鍒版灙鍝嶄笉鐭ラ亾椋炵殑錛?#8221;

“娌℃湁錛屾櫤鍟嗛兘鍦?00浠ヤ笂錛?#8221;

“鏈夋病鏈夊叧鍦ㄧ瀛愰噷鐨?”

“娌℃湁銆?#8221;

銆傘傘?

==============================

鍚庨潰榪樻湁涓鍫?#8220;渚嬪”鎯呭喌銆傛垜浠啓紼嬪簭鎬諱笉鑳界湡鍐欐垚

if(楦熸槸鑱嬪瓙)

else if(楦熸槸鍌誨瓙)

else if(楦熸槸鐦稿瓙)

鍘熷垯搴旇鏄紝濡傛灉涓浜涙儏鍐電‘瀹炴槸 “渚嬪鎯呭喌”錛屽氨鐢╡xception澶勭悊鍚с備笉瑕佸緢鍕ゅ鍦板啓涓鍫哾efensive鐨勫垽鏂傛垜浠笉浼氭湁鏁呬簨閲岀殑灝忕敺瀛╁効鎬濈淮閭d箞婊存按涓嶆紡鐨勩傚埆鎶奐ava紼嬪簭閫鍥瀋璇█浜嗐傚彟涓涓緥瀛愭槸FileNotFoundException, java I/O娌℃湁璁╀綘姣忔鐢ㄦ枃浠墮兘鎻愬墠璋冪敤exists()媯鏌ヤ竴涓嬶紝鎴戞兂鍘熷洜涓嶅厜鏄?媯鏌ユ枃浠剁殑閭d竴姣鏂囦歡瀛樺湪錛宺un鍒頒笅涓姝ョ殑鏃跺欙紝涓嬩竴姣鏂囦歡娑堝け浜嗭紝Sun娌¤寰椾綘浜哄搧閭d箞鍧忓惂銆傜悊蹇典粛鐒舵槸錛屽鏋滀綘瑙夊緱鏂囦歡鑲畾瀛樺湪錛屼綘灝辯洿鎺ョ敤鍚э紝涓鏃︿笉瀛樺湪錛屼綘鍐嶅彟澶栧綋鎴愬紓甯告儏鍐靛鐞嗐備笉瑕佽涓鍫唅f…else寮勮剰浜嗙▼搴忋?

 

3. exception鏈変釜鍏稿瀷鐢ㄦ硶鏄湪鏂規硶浣撲腑錛岃繘琛屽弬鏁板悎娉曟ф牎楠?

 

   1: public BigInteger mod(BigInteger m) {
   2: if (m.signum() <= 0)
   3: throw new ArithmeticException("Modulus <= 0: " + m);
   4: ... // Do the computation
   5: }

涔熸湁寰堝浜虹敤assert璇彞鍒ゆ柇錛?姣斿 Assert.notNull(object)銆傛墜鍔ㄦ姏exception鍙互鎶涚壒瀹氱殑綾誨瀷錛宎ssert璇彞鏇存柟渚褲傚彲浠ユ牴鎹疄闄呮儏鍐靛彇鑸嶃?/p>

 

4. 鏃㈢劧涓婇潰璇翠簡checked exception鏈韓鏄痡ava璁捐涓嶅お鍚堢悊鐨勫湴鏂廣傛垜鍊懼悜浜庤錛屽簲璇?strong>鍙婃椂鎶奵hecked exception translate鎴恥nchecked. 鎴戠煡閬揺xception鐨勫鐞嗗師鍒欐湁涓鏉℃槸錛屽鏋滀綘涓嶇煡閬撴庝箞澶勭悊瀹冿紝灝變笉瑕佹崟鎹夊畠銆?瀵逛簬checked exception鏉ヨ錛屽畠鎬籪orce浣犲幓澶勭悊錛屽お璁ㄥ帉浜嗐傚鏋渃aller涓嶇煡閬撴庝箞澶勭悊錛岀暀鐫緇欐洿涓婂眰鐨勭▼搴忓鐞?#8230;搴曞眰鐨勭▼搴忛兘涓嶄細澶勭悊錛屼竴鑸潵璇翠笂灞傜殑紼嬪簭灝辨洿涓嶇煡閬撹鎬庝箞澶勭悊浜嗭紝閭h繕涓嶅鍦ㄥ敖閲忓簳灞傜殑璋冪敤涓紝瑕佷箞澶勭悊瀹冿紙榪欑鎯呭喌寰堝皯錛屾墦log涔嬬被鐨勭畻涓嶄笂“澶勭悊”錛夛紝瑕佷箞灝辮漿鎴怰untimeException鎶涗笂鏉? 娑堢伃鎺塩hecked exception甯︽潵鐨刡urden. 娉ㄦ剰錛歵ranslate exception鐨勮繃紼嬩腑錛屼笉瑕佹墧浜嗗師鏉ョ殑exception, 鑰岃鎶婂畠鏀懼湪exception constructor鐨刟rgument閲? new RuntimeException(e)銆傝繖鏄緢鍩烘湰鐨勪笢瑗匡紝涓嶅璇淬?/p>

 

5. 涓嶈鍚瀍xception. 榪欎釜澶熀紜錛屼笉澶氳銆?/p>

 

6. 瑙佸埌exception瑕佹妸瀹冭log閲岋紝鑰屼笉鏄畝鍗昿rint stack涓涓嬶紝log4j鐨刟pi鏈夊彲浠ユ帴鍙桾hrowable浣滀負鍙傛暟鐨勩?

 

7. 姣忓眰鎶涘嚭鏉ョ殑exception瑕佸褰撳墠榪欎竴灞傛湁鎰忎箟錛屾瘮濡俻ersistence灞傚嚭闂錛孶I涓婁綘鍛婅瘔瀹㈡埛hibernate鐨剆ession鍏抽棴浜嗭紝涓嶈兘緇х畫load鏁版嵁浜嗭紝瀹㈡埛榪樹互涓轟綘鐨勭▼搴忔庝箞璺熺嫍鐔婁竴鏍瘋繕浼氬啲鐪犵殑銆傚嵆浣挎槸UI灞備互涓嬶紝搴曞眰exception,姣斿sql exception涔熶笉瑕佺埇鍒癲omain灞傞噷澶勭悊

 

8. apache commons鐨刲ang鍖呴噷鏈塃xceptionUtils綾伙紝鐜╁効exception鏈濂芥妸榪欎釜宸ュ叿鎻e彛琚嬮噷銆?br />
9.exception鏄璁$殑涓閮ㄥ垎, 浣嗗畠涓嶅悓浜嶢PI鐨勮璁°傞氬父鎴戜滑璁捐API鐨勬椂鍊欙紝涓嶄細璁捐涓涓嚱鏁癲estroyBaghdad()錛岄氬父鎴戜滑浼氬啓destroyCity(Baghdad)銆傝繖鏍峰仛鐨勭洰鐨勬槸涓轟簡閲嶇敤銆傛崲鍙ヨ瘽璇達紝浣犺璁PI鐨勬椂鍊欙紝鎬繪槸瑁呬綔蹇樹簡use case錛坈aller錛? 鑰屽幓鍐欓傚悎澶嶇敤鐨凙PI, 灝界涓婇潰鐨勪緥瀛恥se case灝辨槸destroy Baghdad, 浣犺繕鏄鍐欐洿general鐨刣estroyCity鍑芥暟錛岀劧鍚庢妸鍩庡競鐨勫悕瀛椾綔涓哄弬鏁頒紶榪涘幓.浣唀xception鐨勮璁′笉搴旇鐢ㄥ悓鏍風殑鎬濊礬鍋氾紝鍥犱負浣犲緢闅炬枡鎯沖埌澶嶇敤鐨勬儏鍐典笅錛屼綘澹版槑鐨別xception鏄笉鏄昏兘鍦ㄤ換浣曟儏鍐典笅閮藉緱鍒板Ε鍠勭殑澶勭悊銆備婦涓緥瀛愶紝榪欐槸鎴戜復鏃舵兂鐨勪緥瀛愶紝褰㈣薄浣嗘槸縐戞妧澶秴鍓嶄簡銆傛垜浠啓涓涓猵rint()紼嬪簭緇欐墦鍗版満A錛宲rint()鐨勬椂鍊欐病鏈夌焊鍙互鎶涗竴涓猚hecked NoPaperException錛岃繖鏃跺檈xceptino鐨勫鐞嗙▼搴忓彲浠ヨ嚜鍔ㄥ姞杞界焊錛堢洰鍓嶈繖涔堥珮綰х殑鍔熻兘姝e湪璐濆皵瀹為獙瀹ょ爺鍙戝憿錛夈備篃璁告湁鏂板瀷鐨勬墦鍗版満B鎬繪槸鍏堝姞綰革紝鍚庢墦鍗幫紝閭d箞姘歌繙涔熶笉瀛樺湪NoPaperException銆傚鏋滄墦鍗版満鏄佸紡鎵撳嵃鏈篊錛屼笉浼氳嚜鍔ㄥ姞杞界焊錛岃鍒癗oPaterException涔熸棤璁″彲鏂斤紝娌℃硶澶勭悊銆俢hecked exception鐨勫摬瀛︽槸錛屽己鍒惰caller澶勭悊瀹冦備粠涓婇潰鐨勪緥瀛愮湅錛屽彧鏈堿鎵撳嵃鏈?strong>闇瑕佸茍鑳藉
澶勭悊NoPaperException銆?B鎵撳嵃鏈轟笉闇瑕佸鐞唀xception銆侰鎵撳嵃鏈烘病鑳藉姏澶勭悊exception. 鎵浠ワ紝|“闇瑕佸茍鑳藉”澶勭悊鏄釜澶弗鏍肩殑闄愬埗錛屼竴鑸儏鍐典笅涓嶅簲璇ョ敤checked exception. 鎴戜滑鍙互璁﹑rint澹版槑鎶涘嚭unchecked exception. 鎻愰啋caller鍙互澶勭悊瀹冿紝浣嗘槸瀵逛簬涓嶅簲璇ュ鐞嗗畠鐨刢aller涔熶笉寮哄埗鍘誨鐞嗗畠銆?/p>

]]>
鎬葷粨java鐨刬nterface鍜宎bstract classhttp://m.tkk7.com/vcycyv/archive/2011/02/20/344716.html浜哄湪姹熸箹浜哄湪姹熸箹Sun, 20 Feb 2011 14:06:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/02/20/344716.htmlhttp://m.tkk7.com/vcycyv/comments/344716.htmlhttp://m.tkk7.com/vcycyv/archive/2011/02/20/344716.html#Feedback1http://m.tkk7.com/vcycyv/comments/commentRss/344716.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/344716.html鍏堣璇磇nterface鍜宎bstract method璇硶涓渶瑕佹敞鎰忕殑鍦版柟銆?/p>

Interface:

1. An interface can contain fields, but these are implicitly static and final.

2. You can choose to explicitly declare the methods in an interface as public, but they are public even if you don鈥檛 say it.

3. Interface cannot define static method

 

Abstract:

1. 涓涓被涓鏋滄墍鏈夌殑鏂規硶閮芥湁瀹炵幇錛屾垜浠粛鐒跺彲浠ュ畾涔夎繖涓被涓篴bstract class

2. abstract鍜宻tatic涓嶈兘鏀懼湪涓璧峰畾涔夋柟娉曘?/p>

 

Interface鍜孉bstract class鐨勫疄璺?/p>

1. interface閫傚悎瀹氫箟mixins錛堜笉鐭ラ亾mixin鎬庝箞緲昏瘧錛屽畠鎸囩獎鎺ュ彛錛屽彧瀹氫箟specific contract錛?

java涓嶈兘澶氶噸緇ф壙銆傚鏋滄兂杈懼埌澶氶噸緇ф壙鐨勬晥鏋滐紝闇瑕佸熷姪鈥滃閲嶅疄鐜扳漣nterface. interface鐨勪竴涓吀鍨嬬敤娉曟槸瀹氫箟灝忔帴鍙c傛瘮濡侰omparable銆傝繖鏍峰畠鐨勫疄鐜版垚鏈瘮杈冨皬錛屼竴涓猚lass姣旇緝瀹規槗mixin澶氫釜interface銆?/p>

2. 濡傛灉interface涓嶆槸mixin, 鑰屾槸澶т竴鐐圭殑鎺ュ彛銆?/p>

effective java, 2nd edition鏈夌簿褰╃殑闃愯堪錛屽浜庡ぇ鎺ュ彛錛屾垜浠線寰浣跨敤skeletal implementation class. 涓句釜渚嬪瓙錛?/p>

   1: // Concrete implementation built atop skeletal implementation
   2: static List<Integer> intArrayAsList(final int[] a) {
   3: if (a == null)
   4: throw new NullPointerException();
   5: return new AbstractList<Integer>() {
   6: public Integer get(int i) {
   7: return a[i];  // Autoboxing (Item 5)
   8: }
   9: @Override public Integer set(int i, Integer val) {
  10: int oldVal = a[i];
  11: a[i] = val;     // Auto-unboxing
  12: return oldVal;  // Autoboxing
  13: }
  14: public int size() {
  15: return a.length;
  16: }
  17: };
  18: }

new AbstractList<Integer>灝辨槸鍦ㄥ簲鐢⊿keletal implementation. 鏈変袱涓ソ澶勶細

a) 瀹冧嬌瀹炵幇鎺ュ彛鏇存柟渚夸簡

b) If, in a subsequent release, you want to add a new method to an abstract class, you can always add a concrete method containing a reasonable default implementation. All existing implementations of the abstract class will then provide the new method. This does not work for interfaces.

璺焛nterface鐩稿叧鐨勮繕鏈変竴涓瘽棰樻槸wrapper class錛屼篃寰堢簿褰╋紝瀹冩槸鎶婄戶鎵胯漿鎴愬悎鎴愮殑鏂瑰紡錛屽簲鐢ㄤ簡decorater妯″紡鐨勬濇兂. 鍦ㄤ功閲岀殑絎?6绔犱粙緇嶃?/p>

   1: // Wrapper class - uses composition in place of inheritance
   2: public class InstrumentedSet<E> extends ForwardingSet<E> {
   3:     private int addCount = 0;
   4:     public InstrumentedSet(Set<E> s) {
   5:         super(s);
   6:     }
   7:     @Override public boolean add(E e) {
   8:         addCount++;
   9:         return super.add(e);
  10:     }
  11:     @Override public boolean addAll(Collection<? extends E> c) {
  12:         addCount += c.size();
  13:         return super.addAll(c);
  14:     }
  15:     public int getAddCount() {
  16:         return addCount;
  17:     }
  18: }
  19: // Reusable forwarding class
  20: public class ForwardingSet<E> implements Set<E> {
  21:     private final Set<E> s;
  22:     public ForwardingSet(Set<E> s) { this.s = s; }
  23:     public void clear()               { s.clear();            }
  24:     public boolean contains(Object o) { return s.contains(o); }
  25:     public boolean isEmpty()          { return s.isEmpty();   }
  26:     public int size()                 { return s.size();      }
  27:     public Iterator<E> iterator()     { return s.iterator();  }
  28:     public boolean add(E e)           { return s.add(e);      }
  29:     public boolean remove(Object o)   { return s.remove(o);   }
  30:     public boolean containsAll(Collection<?> c)
  31:                                    { return s.containsAll(c); }
  32:     public boolean addAll(Collection<? extends E> c)
  33:                                    { return s.addAll(c);      }
  34:     public boolean removeAll(Collection<?> c)
  35:                                    { return s.removeAll(c);   }
  36:     public boolean retainAll(Collection<?> c)
  37:                                    { return s.retainAll(c);   }
  38:     public Object[] toArray()          { return s.toArray();  }
  39:     public <T> T[] toArray(T[] a)      { return s.toArray(a); }
  40:     @Override public boolean equals(Object o)
  41:                                        { return s.equals(o);  }
  42:     @Override public int hashCode()    { return s.hashCode(); }
  43:     @Override public String toString() { return s.toString(); }
  44: }

浣跨敤瀹冪殑瀹㈡埛绔▼搴忥細

   1: Set<Date> s = new InstrumentedSet<Date>(new TreeSet<Date>(cmp));
   2: Set<E> s2 = new InstrumentedSet<E>(new HashSet<E>(capacity));

 

3. 浜轟漢閮借 闈㈠悜鎺ュ彛緙栫▼錛屽緢澶氭椂鍊欑煫鏋夎繃姝d簡錛?鎼炲緱鎺ュ彛婕ぉ椋炪俰nterface甯稿父鏄噸鏋勫嚭鏉ョ殑錛岃屼笉鎬繪槸璁捐鍑烘潵鐨勩傜▼搴忓垎灞備腑錛岃秺鏄潬榪戝簳灞傜殑紼嬪簭錛岃秺鍊懼悜浜庨渶瑕佹帴鍙o紝瓚婇潬榪戦《灞傜殑紼嬪簭錛屽鎺ュ彛鐨勯渶姹傚懼悜浜庤秺灝忋傚鏋滀綘鏄庣煡閬撲互鍚庝笉澶彲鑳芥彁渚涘彟涓濂楀疄鐜幫紝鎻愬墠鍐欎釜鎺ュ彛鎽嗛偅閲屼篃娌″暐鎰忎箟錛屽敖綆″畾涔夋帴鍙g殑鎴愭湰寰堜綆銆傚鏋滀綘鎷呭績涓鏃︽湁涓澶╃‘瀹炴彁渚涗簡鍙︿竴濂楀疄鐜幫紝閲嶆瀯code涔熶笉浼氬緢楹葷儲銆傚彧瑕侀伒瀹堜簡鍗曚竴鑱岃矗鍘熷垯鍜岃開綾崇壒娉曞垯銆傝開綾崇壒娉曞垯鐨勪竴縐嶈〃榪版柟寮忔槸錛歵alk only to your immediate friends銆?/p>

]]>
鍒╃敤jetty瀹炵幇瓚呰交閲忕駭web寮鍙?/title><link>http://m.tkk7.com/vcycyv/archive/2011/02/13/344214.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Sun, 13 Feb 2011 14:40:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/02/13/344214.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/344214.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/02/13/344214.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/344214.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/344214.html</trackback:ping><description><![CDATA[<p>鍑犲勾鍓嶏紝濡傛灉浣犱笉鐢‥JB錛屽緢澶氫漢閮界敤IDE+tomcat鎻掍歡鍋歸eb寮鍙戙?鐜板湪瓚婃潵瓚婂浜轟嬌鐢╦etty浜嗐傝繖涓嶆槸綆鍗曞湴鐢↗etty鏇挎崲tomcat錛屽閥濡欑殑鍦版柟鍦ㄤ簬鎴戜滑鍙互鐩存帴鐢╩ain鍑芥暟鍦↖DE閲屽惎鍔↗etty. 榪欐牱錛屼綘涓嶉渶瑕侀厤緗甀DE鐨剆erver銆備笉鍚屼簬IDE+tomcat鎻掍歡鐨勬柟寮忛渶瑕佷袱涓猵roject,web app鍜宻erver project. 浣跨敤涓嬮潰浠嬬粛鐨勬柟寮忎綘鍙湁涓涓猨ava project灝辮. 寮鍙戠幆澧冩洿綆鍗曪紝debug涔熸洿鏂逛究錛屼笉闇瑕乺emote debug鐨勬柟寮忥紝jetty闈炲父蹇紝鍙互鏄庢樉鎻愰珮寮鍙戞晥鐜囥?/p> <p>鍙傝冧簡緗戜笂鐨勪竴浜涙枃绔狅紝鏁寸悊浜嗕竴涓嬨傛湰鏂囦互Eclipse浣滀負IDE銆傛渶鍚庢湁鍙互榪愯鐨勭ず渚嬩唬鐮佷笅杞斤紝闈炲父綆鍗曘?/p> <p>1. 寤虹珛Java project(涓嶅繀鏄痙ynamic web project), 鍙栦釜鍚嶅瓧錛屾瘮濡俲etty</p> <p>2. 寤虹珛jetty鐩綍鍙婂叾瀛愮洰褰曞鍥炬墍紺恒?鎵鏈夋枃浠墮兘鍙互鍦ㄦ渶鍚庣殑闄勪歡閲屾壘鍒般傜暐浣滀竴鐐硅鏄庯細webdefault.xml閫氬父涓嶉渶瑕佷綘鏀廣傚畠鏄痺eb.xml涔嬪鐨勪竴涓厤緗枃浠訛紝閰嶇疆涓浜涘叕鍏卞睘鎬с倃eb app鐨勬枃浠訛紝jsp涔嬬被鐨勯兘鏀懼湪web鐩綍涓嬨倃eb.xml鍜宨ndex.jsp閮芥槸紺轟緥鎬ц川鏈綆鍗曠殑銆俵ib鐩綍涓嬮渶瑕佹斁涓浜沯etty鐨刯ar鍖咃紝涔熶竴鏍峰湪闄勪歡閲屾湁</p> <p> <a href="http://m.tkk7.com/images/blogjava_net/vcycyv/WindowsLiveWriter/jettyweb_13ECB/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://m.tkk7.com/images/blogjava_net/vcycyv/WindowsLiveWriter/jettyweb_13ECB/image_thumb.png" width="283" height="435"></a> </p> <p>3. 鏂板緩java鏂囦歡濡備笅錛氾紙娉ㄦ剰榪欓噷鎴戠敤鐨勭鍙f槸8020錛屼互鍏嶅拰鍏朵粬jboss鎴杢omcat鍐茬獊錛?/p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">package</span> jetty;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">import</span> org.mortbay.jetty.Connector;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> <span style="color: #0000ff">import</span> org.mortbay.jetty.Server;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> <span style="color: #0000ff">import</span> org.mortbay.jetty.nio.SelectChannelConnector;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> <span style="color: #0000ff">import</span> org.mortbay.jetty.webapp.WebAppContext;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> OneWebApp</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) <span style="color: #0000ff">throws</span> Exception</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> String jetty_home = <span style="color: #006080">"jetty"</span>;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> <span style="color: #0000ff">int</span> port = 8020;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span> Server server = <span style="color: #0000ff">new</span> Server();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> Connector connector=<span style="color: #0000ff">new</span> SelectChannelConnector();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span> connector.setPort(port);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19"> 19:</span> server.addConnector(connector);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20"> 20:</span> </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21"> 21:</span> WebAppContext webapp = <span style="color: #0000ff">new</span> WebAppContext(jetty_home + <span style="color: #006080">"/web"</span>, <span style="color: #006080">"/jetty"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22"> 22:</span> webapp.setDefaultsDescriptor(jetty_home+<span style="color: #006080">"/etc/webdefault.xml"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23"> 23:</span> </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24"> 24:</span> server.setHandler(webapp);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25"> 25:</span> </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26"> 26:</span> server.start();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27"> 27:</span> <span style="color: #008000">//server.join();</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28"> 28:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29"> 29:</span> }</pre><!--CRLF--></div></div> <p>鍙互run榪欎釜java鏂囦歡錛岀劧鍚庡湪嫻忚鍣ㄩ噷璁塊棶<a href="http://localhost:8020/jetty">http://localhost:8020/jetty</a>鐪嬬粨鏋溿?/p> <p> </p> <p>鏁翠釜eclipse宸ョ▼鍙互浠庤繖閲屼笅杞斤細<a title="http://cid-d8b11f9bf86fecfa.office.live.com/self.aspx/.Public/code/RunJettyInEclipse.rar" >http://cid-d8b11f9bf86fecfa.office.live.com/self.aspx/.Public/code/RunJettyInEclipse.rar</a></p> <img src ="http://m.tkk7.com/vcycyv/aggbug/344214.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-02-13 22:40 <a href="http://m.tkk7.com/vcycyv/archive/2011/02/13/344214.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>jvm 鍜?profilerhttp://m.tkk7.com/vcycyv/archive/2011/01/30/343782.html浜哄湪姹熸箹浜哄湪姹熸箹Sun, 30 Jan 2011 10:12:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/01/30/343782.htmlhttp://m.tkk7.com/vcycyv/comments/343782.htmlhttp://m.tkk7.com/vcycyv/archive/2011/01/30/343782.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/343782.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/343782.html騫磋交浠o細

    鎵鏈夋柊鐢熸垚鐨勫璞¢鍏堥兘鏄斁鍦ㄥ勾杞諱唬鐨勩傚勾杞諱唬鐨勭洰鏍囧氨鏄敖鍙兘蹇熺殑鏀墮泦鎺夐偅浜涚敓鍛藉懆鏈熺煭鐨勫璞°傚勾杞諱唬鍒嗕笁涓尯銆備竴涓狤den鍖猴紝涓や釜 Survivor鍖?涓鑸岃█)銆傚ぇ閮ㄥ垎瀵硅薄鍦‥den鍖轟腑鐢熸垚銆傚綋Eden鍖烘弧鏃訛紝榪樺瓨媧葷殑瀵硅薄灝嗚澶嶅埗鍒癝urvivor鍖猴紙涓や釜涓殑涓涓級錛屽綋榪欎釜 Survivor鍖烘弧鏃訛紝姝ゅ尯鐨勫瓨媧誨璞″皢琚鍒跺埌鍙﹀涓涓猄urvivor鍖猴紝褰撹繖涓猄urvivor鍘諱篃婊′簡鐨勬椂鍊欙紝浠庣涓涓猄urvivor鍖哄鍒?榪囨潵鐨勫茍涓旀鏃惰繕瀛樻椿鐨勫璞★紝灝嗚澶嶅埗“騫磋佸尯(Tenured)”銆傞渶瑕佹敞鎰忥紝Survivor鐨勪袱涓尯鏄縐扮殑錛屾病鍏堝悗鍏崇郴錛屾墍浠ュ悓涓涓尯涓彲鑳藉悓鏃?瀛樺湪浠嶦den澶嶅埗榪囨潵 瀵硅薄錛屽拰浠庡墠涓涓猄urvivor澶嶅埗榪囨潵鐨勫璞★紝鑰屽鍒跺埌騫磋佸尯鐨勫彧鏈変粠絎竴涓猄urvivor鍘昏繃鏉ョ殑瀵硅薄銆傝屼笖錛孲urvivor鍖烘繪湁涓涓槸絀?鐨勩傚悓鏃訛紝鏍規嵁紼嬪簭闇瑕侊紝Survivor鍖烘槸鍙互閰嶇疆涓哄涓殑錛堝浜庝袱涓級錛岃繖鏍峰彲浠ュ鍔犲璞″湪騫磋交浠d腑鐨勫瓨鍦ㄦ椂闂達紝鍑忓皯琚斁鍒板勾鑰佷唬鐨勫彲鑳姐?/p>

騫磋佷唬錛?/strong>

    鍦ㄥ勾杞諱唬涓粡鍘嗕簡N嬈″瀮鍦懼洖鏀跺悗浠嶇劧瀛樻椿鐨勫璞★紝灝變細琚斁鍒板勾鑰佷唬涓傚洜姝わ紝鍙互璁や負騫磋佷唬涓瓨鏀劇殑閮芥槸涓浜涚敓鍛藉懆鏈熻緝闀跨殑瀵硅薄銆?/p>

鎸佷箙浠o細

    鐢ㄤ簬瀛樻斁闈欐佹枃浠訛紝濡備粖Java綾匯佹柟娉曠瓑銆傛寔涔呬唬瀵瑰瀮鍦懼洖鏀舵病鏈夋樉钁楀獎鍝嶏紝浣嗘槸鏈変簺搴旂敤鍙兘鍔ㄦ佺敓鎴愭垨鑰呰皟鐢ㄤ竴浜沜lass錛屼緥濡侶ibernate 絳夛紝鍦ㄨ繖縐嶆椂鍊欓渶瑕佽緗竴涓瘮杈冨ぇ鐨勬寔涔呬唬絀洪棿鏉ュ瓨鏀捐繖浜涜繍琛岃繃紼嬩腑鏂板鐨勭被銆傛寔涔呬唬澶у皬閫氳繃-XX:MaxPermSize=<N>榪涜璁?緗?/p>

浠涔堟儏鍐典笅瑙﹀彂鍨冨溇鍥炴敹

鐢變簬瀵硅薄榪涜浜嗗垎浠e鐞嗭紝鍥犳鍨冨溇鍥炴敹鍖哄煙銆佹椂闂翠篃涓嶄竴鏍楓侴C鏈変袱縐嶇被鍨嬶細Scavenge GC 鍜?strong>Full GC 銆?/p>

Scavenge GC

      涓鑸儏鍐典笅錛屽綋鏂板璞$敓鎴愶紝騫朵笖鍦‥den鐢寵絀洪棿澶辮觸鏃訛紝灝變細瑙﹀彂Scavenge GC錛屽Eden鍖哄煙榪涜GC錛屾竻闄ら潪瀛樻椿瀵硅薄錛屽茍涓旀妸灝氫笖瀛樻椿鐨勫璞$Щ鍔ㄥ埌Survivor鍖恒傜劧鍚庢暣鐞哠urvivor鐨勪袱涓尯銆傝繖縐嶆柟寮忕殑GC鏄 騫磋交浠g殑Eden鍖鴻繘琛岋紝涓嶄細褰卞搷鍒板勾鑰佷唬銆傚洜涓哄ぇ閮ㄥ垎瀵硅薄閮芥槸浠嶦den鍖哄紑濮嬬殑錛屽悓鏃禘den鍖轟笉浼氬垎閰嶇殑寰堝ぇ錛屾墍浠den鍖虹殑GC浼氶綣佽繘琛屻傚洜 鑰岋紝涓鑸湪榪欓噷闇瑕佷嬌鐢ㄩ熷害蹇佹晥鐜囬珮鐨勭畻娉曪紝浣縀den鍘昏兘灝藉揩絀洪棽鍑烘潵銆?/p>

Full GC

      瀵規暣涓爢榪涜鏁寸悊錛屽寘鎷琘oung銆乀enured鍜孭erm銆侳ull GC鍥犱負闇瑕佸鏁翠釜瀵硅繘琛屽洖鏀訛紝鎵浠ユ瘮Scavenge GC瑕佹參錛屽洜姝ゅ簲璇ュ敖鍙兘鍑忓皯Full GC鐨勬鏁般傚湪瀵笿VM璋冧紭鐨勮繃紼嬩腑錛屽緢澶т竴閮ㄥ垎宸ヤ綔灝辨槸瀵逛簬FullGC鐨勮皟鑺傘傛湁濡備笅鍘熷洜鍙兘瀵艱嚧Full GC錛?/p>

      騫磋佷唬錛圱enured錛夎鍐欐弧

      鎸佷箙浠o紙Perm錛夎鍐欐弧

      System.gc()琚樉紺鴻皟鐢?/p>

     涓婁竴嬈C涔嬪悗Heap鐨勫悇鍩熷垎閰嶇瓥鐣ュ姩鎬佸彉鍖?/p>

涓茶澶勭悊鍣細

--閫傜敤鎯呭喌錛氭暟鎹噺姣旇緝灝忥紙100M宸﹀彸錛夛紱鍗曞鐞嗗櫒涓嬪茍涓斿鍝嶅簲鏃墮棿鏃犺姹傜殑搴旂敤銆?
--緙虹偣錛氬彧鑳界敤浜庡皬鍨嬪簲鐢?/p>

騫惰澶勭悊鍣細

--閫傜敤鎯呭喌錛?#8220;瀵瑰悶鍚愰噺鏈夐珮瑕佹眰”錛屽CPU銆佸搴旂敤鍝嶅簲鏃墮棿鏃犺姹傜殑涓佸ぇ鍨嬪簲鐢ㄣ備婦渚嬶細鍚庡彴澶勭悊銆佺瀛﹁綆椼?
--緙虹偣錛氬瀮鍦炬敹闆嗚繃紼嬩腑搴旂敤鍝嶅簲鏃墮棿鍙兘鍔犻暱

騫跺彂澶勭悊鍣細

--閫傜敤鎯呭喌錛?#8220;瀵瑰搷搴旀椂闂存湁楂樿姹?#8221;錛屽CPU銆佸搴旂敤鍝嶅簲鏃墮棿鏈夎緝楂樿姹傜殑涓佸ぇ鍨嬪簲鐢ㄣ備婦渚嬶細Web鏈嶅姟鍣?搴旂敤鏈嶅姟鍣ㄣ佺數淇′氦鎹€侀泦鎴愬紑鍙戠幆澧冦?/p>

===================================

浠婂ぉ浣跨敤jmap鍜宩hat璇曞浘瑙e喅permgen out of memory鐨勯棶棰橈紝鎵懼埌浜嗕竴涓緢濂界殑鏂囩珷錛?/p>

http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded

璐翠釜寮澶達紝闃叉鍘熷笘涓簡錛岃繛google鐨勭嚎绱㈤兘娌℃湁

How to fix the dreaded "java.lang.OutOfMemoryError: PermGen space" exception (classloader leaks)

In the previous blog entry Classloader leaks: the dreaded "java.lang.OutOfMemoryError: PermGen space" exception  I explained how this type of problem can originate in the application code that you deploy to an application server.  In this post I'll explain how to track down the leak so that you can fix it.

Profilers
Memory leak? Use a profiler. Right? Well... generally speaking the answer is yes, but classloader leaks are a bit special...



]]>
java weak reference錛堣漿錛?/title><link>http://m.tkk7.com/vcycyv/archive/2011/01/30/343781.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Sun, 30 Jan 2011 10:11:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/01/30/343781.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/343781.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/01/30/343781.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/343781.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/343781.html</trackback:ping><description><![CDATA[<p>杞澆鑷細 <a title="http://www.java-tips.org/java-se-tips/java.util/using-weakhashmap-for-listener-lists.html" >http://www.java-tips.org/java-se-tips/java.util/using-weakhashmap-for-listener-lists.html</a></p> <p>In the Java platform, there are four types of references to objects. Direct references are the type you normally use, as in:</p> <p><code>Object obj = <strong>new </strong>Object()</code></p> <p>You can think of direct references as strong references that require no extra coding to create or access the object. The remaining three types of references are subclasses of the <code>Reference</code> class found in the <code>java.lang.ref</code> package. Soft references are provided by the <code>SoftReference</code> class, weak references by the <code>WeakReference</code> class, and phantom references by <code>PhantomReference</code>.</p> <p>  <br>Soft references act like a data cache. When system memory is low, the garbage collector can arbitrarily free an object whose only reference is a soft reference. In other words, if there are no strong references to an object, that object is a candidate for release. The garbage collector is required to release any soft references before throwing an <code>OutOfMemoryException</code>. </p> <p><br>Weak references are weaker than soft references. If the only references to an object are weak references, the garbage collector can reclaim the memory used by an object at any time. There is no requirement for a low memory situation. Typically, memory used by the object is reclaimed in the next pass of the garbage collector. </p> <p><br>Phantom references relate to cleanup tasks. They offer a notification immediately before the garbage collector performs the finalization process and frees an object. Consider it a way to do cleanup tasks within an object. </p> <img src ="http://m.tkk7.com/vcycyv/aggbug/343781.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-01-30 18:11 <a href="http://m.tkk7.com/vcycyv/archive/2011/01/30/343781.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>java鐖剁嚎紼嬪瓙綰跨▼錛堣漿錛?/title><link>http://m.tkk7.com/vcycyv/archive/2011/01/30/343779.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Sun, 30 Jan 2011 10:06:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/01/30/343779.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/343779.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/01/30/343779.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/343779.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/343779.html</trackback:ping><description><![CDATA[<p>闂細鍦ㄧ埗綰跨▼涓璑ew浜嗕竴涓瓙綰跨▼錛屾兂鍦ㄥ仠姝㈢埗綰跨▼鏃朵篃鍋滄瀛愮嚎紼嬶紝搴旇鎬庝箞鍋氾紵</p> <p>絳旓細</p> <p>浠庢煇縐嶇▼搴︿笂璁詫紝鍋氫笉鍒般?nbsp;  </p> <p>  涓嶇鏄埗綰跨▼榪樻槸瀛愮嚎紼嬶紝榪欏彧涓嶈繃鏄湪榪愯鏃惰皝寤轟簡璋佹椂鐢ㄧ殑錛屼竴鏃︽墍璋撶殑瀛楃嚎紼嬭鍚姩錛岃繖涓や釜綰跨▼鏄病鏈夊厛鍚庤吹璐卞尯鍒嗙殑銆?nbsp;  </p> <p>  浠諱綍綰跨▼鏄病鏈夊姙娉曟妸鍙﹀涓涓嚎紼嬬粓姝㈢殑銆?nbsp;  </p> <p>  濡傛灉浣犱竴瀹氭兂浣犺鐨勯偅鏍鋒槸綰跨殑璇濓紝涓嬮潰鏄敮涓涓彲琛屾柟妗堛傚湪"鐖剁嚎紼?寤虹珛“瀛愮嚎紼?#8221;鏃訛紝鎶?#8220;鐖剁嚎紼?#8221;鐨刬nstance浼犺繃鍘伙紝鍦?#8220;瀛愮嚎紼?#8221;閲岋紝涓嶅仠鐨刢heck"鐖剁嚎紼?鏄惁榪樺瓨媧伙紝濡傛灉鍚︼紝鍋滄銆?nbsp;  </p> <p>  鐩稿弽鐨勶紝濡傛灉"鐖剁嚎紼?闇瑕佸湪"瀛愮嚎紼?緇堜簡鏃剁粨鏉燂紝鍦?鐖剁嚎紼?寤虹珛“瀛愮嚎紼?#8221;鏃訛紝鐣欎綇“瀛愮嚎紼?#8221;鐨刬nstance鐒跺悗keep   checking   whether   it's   still   alive.</p> <p>================================================================================</p> <p>鍙湁鍦ㄦ墍鏈夐潪瀹堟姢榪涚▼閮藉仠姝㈢殑鎯呭喌涓嬶紝jvm鎵嶉鍑恒俶ain綰跨▼鍋滄jvm涔熶笉涓瀹氶鍑猴細</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> TestMitiThread {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] rags) {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> System.out.println(Thread.currentThread().getName() + <span style="color: #006080">" 綰跨▼榪愯寮濮?"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> <span style="color: #0000ff">new</span> MitiSay(<span style="color: #006080">"A"</span>).start();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> <span style="color: #0000ff">new</span> MitiSay(<span style="color: #006080">"B"</span>).start();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> System.out.println(Thread.currentThread().getName() + <span style="color: #006080">" 綰跨▼榪愯緇撴潫!"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> class MitiSay <span style="color: #0000ff">extends</span> Thread {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19"> 19:</span> <span style="color: #0000ff">public</span> MitiSay(String threadName) {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20"> 20:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21"> 21:</span> <span style="color: #0000ff">super</span>(threadName);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22"> 22:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23"> 23:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24"> 24:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25"> 25:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> run() {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26"> 26:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27"> 27:</span> System.out.println(getName() + <span style="color: #006080">" 綰跨▼榪愯寮濮?"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28"> 28:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29"> 29:</span> <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i < 10; i++) {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30"> 30:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31"> 31:</span> System.out.println(i + <span style="color: #006080">" "</span> + getName());</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32"> 32:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33"> 33:</span> <span style="color: #0000ff">try</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34"> 34:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35"> 35:</span> sleep((<span style="color: #0000ff">int</span>) Math.random() * 10);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36"> 36:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37"> 37:</span> } <span style="color: #0000ff">catch</span> (InterruptedException e) {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38"> 38:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39"> 39:</span> e.printStackTrace();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40"> 40:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41"> 41:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42"> 42:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43"> 43:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44"> 44:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45"> 45:</span> System.out.println(getName() + <span style="color: #006080">" 綰跨▼榪愯緇撴潫!"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46"> 46:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47"> 47:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48"> 48:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49"> 49:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50"> 50:</span>  </pre><!--CRLF--></div></div> <p>榪愯緇撴灉錛?/p> <p>main 綰跨▼榪愯寮濮?</p> <p>main 綰跨▼榪愯緇撴潫!</p> <p>A 綰跨▼榪愯寮濮?</p> <p>0 A</p> <p>1 A</p> <p>B 綰跨▼榪愯寮濮?</p> <p>2 A</p> <p>0 B</p> <p>3 A</p> <p>4 A</p> <p>1 B</p> <p>5 A</p> <p>6 A</p> <p>7 A</p> <p>8 A</p> <p>9 A</p> <p>A 綰跨▼榪愯緇撴潫!</p> <p>2 B</p> <p>3 B</p> <p>4 B</p> <p>5 B</p> <p>6 B</p> <p>7 B</p> <p>8 B</p> <p>9 B</p> <p>B 綰跨▼榪愯緇撴潫!</p> <img src ="http://m.tkk7.com/vcycyv/aggbug/343779.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-01-30 18:06 <a href="http://m.tkk7.com/vcycyv/archive/2011/01/30/343779.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://spxingyiquan.com" target="_blank">日韩成人免费aa在线看</a>| <a href="http://69xjj.com" target="_blank">美女巨胸喷奶水视频www免费</a>| <a href="http://987566.com" target="_blank">亚洲国产日产无码精品</a>| <a href="http://51xinshiji.com" target="_blank">久久亚洲免费视频</a>| <a href="http://87fulitv.com" target="_blank">久久精品亚洲一区二区</a>| <a href="http://znboxcdn304.com" target="_blank">国产∨亚洲V天堂无码久久久</a>| <a href="http://www-75044.com" target="_blank">亚洲欧洲无码AV电影在线观看</a>| <a href="http://imfakaixin.com" target="_blank">亚洲精品一级无码鲁丝片</a>| <a href="http://727744.com" target="_blank">亚洲熟伦熟女新五十路熟妇</a>| <a href="http://xx2015.com" target="_blank">久久精品国产亚洲精品</a>| <a href="http://jinluffcl.com" target="_blank">伊人久久亚洲综合</a>| <a href="http://juguanghr.com" target="_blank">亚洲色WWW成人永久网址</a>| <a href="http://www759696b.com" target="_blank">久久亚洲国产午夜精品理论片</a>| <a href="http://luyifeile.com" target="_blank">亚洲国产综合无码一区</a>| <a href="http://roocos.com" target="_blank">亚洲av无码专区在线播放</a>| <a href="http://j3223.com" target="_blank">久久久久久亚洲AV无码专区</a>| <a href="http://www-8908.com" target="_blank">亚洲精品视频观看</a>| <a href="http://k67m.com" target="_blank">亚洲乱码在线观看</a>| <a href="http://theav25.com" target="_blank">MM1313亚洲国产精品</a>| <a href="http://mtripmall.com" target="_blank">曰批全过程免费视频免费看</a>| <a href="http://singbomb.com" target="_blank">国产精品福利片免费看</a>| <a href="http://yaojing123.com" target="_blank">免费福利在线视频</a>| <a href="http://ycjs999.com" target="_blank">最近2019中文字幕免费大全5 </a>| <a href="http://bbav04.com" target="_blank">久久精品国产亚洲AV蜜臀色欲 </a>| <a href="http://67f6.com" target="_blank">亚洲毛片av日韩av无码</a>| <a href="http://flowsns.com" target="_blank">亚洲日韩中文无码久久</a>| <a href="http://www-kj5799.com" target="_blank">亚洲今日精彩视频</a>| <a href="http://jinguwj.com" target="_blank">亚洲av专区无码观看精品天堂</a>| <a href="http://cqkalai.com" target="_blank">亚洲日韩av无码中文</a>| <a href="http://bwgdbjb.com" target="_blank">添bbb免费观看高清视频</a>| <a href="http://yy6767.com" target="_blank">久久99精品免费一区二区</a>| <a href="http://nblfkj.com" target="_blank">99re在线这里只有精品免费</a>| <a href="http://16lds.com" target="_blank">噼里啪啦电影在线观看免费高清</a>| <a href="http://bixnu.com" target="_blank">无码国模国产在线观看免费</a>| <a href="http://adcbgy.com" target="_blank">亚洲一区二区视频在线观看</a>| <a href="http://sewuji.com" target="_blank">亚洲精品在线观看视频</a>| <a href="http://by22877.com" target="_blank">国产亚洲玖玖玖在线观看</a>| <a href="http://cin17.com" target="_blank">一级毛片免费在线</a>| <a href="http://lwjiheng.com" target="_blank">91视频免费网址</a>| <a href="http://527352.com" target="_blank">国产精品免费看香蕉</a>| <a href="http://www-8908.com" target="_blank">亚洲乱码精品久久久久..</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>