锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲自偷自拍另类图片二区 ,亚洲欧洲第一a在线观看,国产亚洲精久久久久久无码77777http://m.tkk7.com/lichen6928/zh-cnSat, 10 May 2025 10:40:39 GMTSat, 10 May 2025 10:40:39 GMT60java涓瑿lass綾誨瀷錛堬紤錛?/title><link>http://m.tkk7.com/lichen6928/archive/2011/03/13/346154.html</link><dc:creator>灝忔櫀</dc:creator><author>灝忔櫀</author><pubDate>Sun, 13 Mar 2011 10:41:00 GMT</pubDate><guid>http://m.tkk7.com/lichen6928/archive/2011/03/13/346154.html</guid><wfw:comment>http://m.tkk7.com/lichen6928/comments/346154.html</wfw:comment><comments>http://m.tkk7.com/lichen6928/archive/2011/03/13/346154.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/lichen6928/comments/commentRss/346154.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/lichen6928/services/trackbacks/346154.html</trackback:ping><description><![CDATA[<h4 align="left"> </h4> <p>鍦╦ava紼嬪簭涓瘡涓涓被閮芥湁涓涓狢lass瀵硅薄錛岃淇濆瓨鍦ㄥ悓鍚嶇殑.Class瀵硅薄褰撲腑錛孞VM浼?xì)鋴社敤绫诲姞铦插櫒鍔犺浇Class鏂囦歡鐢熸垚綾葷殑瀵硅薄淇℃伅錛?/p> <p>褰撴垜浠垱寤轟竴涓被鐨勫璞℃垨鑰呰皟鐢ㄨ繖涓璞$殑闈?rùn)鎬佹柟娉?jvm浼?xì)鑷姩鍔犺浇绫荤殑瀵硅薄淇℃?/p> <h4>鑾峰緱綾葷殑瀵硅薄淇℃伅</h4> <p>鎴戜滑涓鑸父鐢ㄧ敤涓ょ鏂瑰紡鑾峰緱綾葷殑瀵硅薄淇℃伅錛?/p> <p>1. 鎴戜滑鍙互鐢–lass.forName()鏂規(guī)硶鍔ㄦ佺殑鏍規(guī)嵁綾誨悕鑾峰緱涓涓被鐨凜lass瀵硅薄錛?/p> <pre style="border: 1px solid #c0c0c0; padding: 5px; background-color: #f0f0f0; min-height: 40px; width: 650px; overflow: auto;"> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: <span style="color: #008000;">/**<br /> </span></pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 2: * 浣跨敤姝ゆ柟娉曚負(fù)鑷姩鍒濆鍖栭潤(rùn)鎬佸彉閲忓拰鎵цstatic鍧楃殑浠g爜<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 3: * 濡傛灉鎵句笉鍒板璞′細(xì)鎶涘嚭涓涓狢lassNotFoundException<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 4: */<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 5: Class second = Class.forName("<span style="color: #8b0000;">classLoad.Second</span>");</pre> </pre> <p>2. 鎴戜滑榪樺彲浠ョ敤Class class = ClassName.class 鏉ョ洿鎺ヨ幏鍙栦竴涓被鐨勭被鍨嬩俊鎭?浣嗙敤瀹冨拰Class.forName()鑾峰彇綾葷殑瀵硅薄</p> <p>寮曠敤淇℃伅鍦ㄩ潤(rùn)鎬佸潡鏃剁殑鎵ц鏃墮棿涓婁笉鍚岋紝鐪嬩笅闈㈢殑渚嬪瓙錛?/p> <p>涓涓櫘閫氱被淇℃伅</p> <pre style="border: 1px solid #c0c0c0; padding: 5px; background-color: #f0f0f0; min-height: 40px; width: 705px; height: 540px; overflow: auto;"> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: <span style="color: #0000ff;">interface</span> Interface{<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 2: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> String interFlag = "<span style="color: #8b0000;">鎺ュ彛</span>";<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 3: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 4: }<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 5: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 6: <span style="color: #0000ff;">class</span> Parent <span style="color: #0000ff;">implements</span> Interface{<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 7: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> String parntFLAG = "<span style="color: #8b0000;">鐖剁被闈?rùn)鎬佸彉閲?/span>";<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 8: <span style="color: #0000ff;">static</span>{<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 9: <span style="color: #0000ff;">final</span> String flag2 = "<span style="color: #8b0000;">flag2</span>";<span style="color: #008000;">//static 鍖轟腑鍙兘鐢╢inal淇グ</span><br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 10: System.out.println("<span style="color: #8b0000;">鎴戝湪鐖剁被闈?rùn)鎬佸尯閲岄潰錛?/span>"+parntFLAG);<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 11: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 12: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 13: <span style="color: #0000ff;">public</span> Parent(){<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 14: System.out.println("<span style="color: #8b0000;">鎴戝湪鐖剁被鏋勯犲嚱鏁伴噷闈紒</span>");<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 15: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 16: }<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 17: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 18: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 19: <span style="color: #0000ff;">class</span> Son <span style="color: #0000ff;">extends</span> Parent{<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 20: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> String sonFLAG = "<span style="color: #8b0000;">瀛愮被綾婚潤(rùn)鎬佸彉閲?/span>";<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 21: <span style="color: #0000ff;">static</span>{<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 22: System.out.println("<span style="color: #8b0000;">鎴戝湪瀛愮被闈?rùn)鎬佸尯閲岄潰錛?/span>"+sonFLAG);<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 23: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 24: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 25: <span style="color: #0000ff;">public</span> Son(){<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 26: System.out.println("<span style="color: #8b0000;">鎴戝湪瀛愮被鏋勯犲嚱鏁伴噷闈紒</span>");<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 27: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 28: }</pre> </pre> <pre style="border: 1px solid #c0c0c0; padding: 5px; background-color: #f0f0f0; min-height: 40px; width: 705px; height: 519px; overflow: auto;"> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: <span style="color: #0000ff;">interface</span> Interface{<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 2: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> String interFlag = "<span style="color: #8b0000;">鎺ュ彛</span>";<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 3: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 4: }<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 5: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 6: <span style="color: #0000ff;">class</span> Parent <span style="color: #0000ff;">implements</span> Interface{<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 7: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> String parntFLAG = "<span style="color: #8b0000;">鐖剁被闈?rùn)鎬佸彉閲?/span>";<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 8: <span style="color: #0000ff;">static</span>{<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 9: <span style="color: #0000ff;">final</span> String flag2 = "<span style="color: #8b0000;">flag2</span>";<span style="color: #008000;">//static 鍖轟腑鍙兘鐢╢inal淇グ</span><br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 10: System.out.println("<span style="color: #8b0000;">鎴戝湪鐖剁被闈?rùn)鎬佸尯閲岄潰錛?/span>"+parntFLAG);<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 11: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 12: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 13: <span style="color: #0000ff;">public</span> Parent(){<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 14: System.out.println("<span style="color: #8b0000;">鎴戝湪鐖剁被鏋勯犲嚱鏁伴噷闈紒</span>");<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 15: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 16: }<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 17: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 18: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 19: <span style="color: #0000ff;">class</span> Son <span style="color: #0000ff;">extends</span> Parent{<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 20: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> String sonFLAG = "<span style="color: #8b0000;">瀛愮被綾婚潤(rùn)鎬佸彉閲?/span>";<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 21: <span style="color: #0000ff;">static</span>{<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 22: System.out.println("<span style="color: #8b0000;">鎴戝湪瀛愮被闈?rùn)鎬佸尯閲岄潰錛?/span>"+sonFLAG);<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 23: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 24: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 25: <span style="color: #0000ff;">public</span> Son(){<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 26: System.out.println("<span style="color: #8b0000;">鎴戝湪瀛愮被鏋勯犲嚱鏁伴噷闈紒</span>");<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 27: }<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 28: }</pre> </pre> <p>浣跨敤榪欑鏂規(guī)硶寮曠敤綾葷殑瀵硅薄涓嶄細(xì)濮嬪寲闈?rùn)鎬佸彉閲忓拰鎵ц闈?rùn)鎬佸潡淇℃伅錛岃繖浜涗唬鐮佹柟娉曚細(xì)鍦ㄩ嬈″紩鐢ㄦ椂鎵ц錛?/p> <p>濡備笅寮曠敤鐖剁被鐨勯潤(rùn)鎬佸彉閲忥紝涓嶄細(xì)鎵ц瀛愮被鐨勯潤(rùn)鎬佸潡錛?/p> <pre style="border: 1px solid #c0c0c0; padding: 5px; background-color: #f0f0f0; min-height: 40px; width: 650px; overflow: auto;"> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> ClassLoad {<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 2: <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> ClassNotFoundException {<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 3: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 4: <span style="color: #008000;">//Son son = new Son();</span><br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 5: <span style="color: #008000;">/**<br /> </span></pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 6: * 鎴戜滑浣跨敤涓涓被鐨勬椂鍊欓渶瑕佽繘琛屼互涓嬶紦欏瑰伐浣滐紟<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 7: * 1.鍔犺澆錛?br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 8: * 2.閾炬帴<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 9: * 3.鍒濆鍖栵紝姝ゆ浼?xì)鍒濆鍖栭潤(rùn)鎬佸彉閲忓拰鎵ц闈?rùn)鎬佸潡淇℃伅錛屼絾鏄繖縐嶆柟娉曚細(xì)鍦?br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 10: * 鐪熸璋冪敤鏂規(guī)硶鏃舵墽琛?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 11: */<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 12: Class son = Son.<span style="color: #0000ff;">class</span>;<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 13: System.out.println("<span style="color: #8b0000;">闈?rùn)鎬佸尯鐨勫垵濮嬪寲浼?xì)鍦ㄨ皟鐢ㄦ椂鎵ц锛?/span>");<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 14: <span style="color: #008000;">// parntFLAG 鏄埗綾葷殑闈?rùn)鎬佸彉閲忋</span><br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 15: <span style="color: #008000;">// 姝ゅ鍙細(xì)鎵ц鐖剁被鐨勯潤(rùn)鎬佸揩</span><br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 16: System.out.println(Son.<font color="#ff0000">parntFLAG</font>);<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 17: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 18: <span style="color: #008000;">/**<br /> </span></pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 19: * 榪愯緇撴灉<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 20: *闈?rùn)鎬佸尯鐨勫垵濮嬪寲浼?xì)鍦ㄨ皟鐢ㄦ椂鎵ц锛?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 21: *鎴戝湪鐖剁被闈?rùn)鎬佸尯閲岄潰錛佺埗綾婚潤(rùn)鎬佸彉閲?br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 22: *鐖剁被闈?rùn)鎬佸彉閲?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 23: */<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 24: }<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 25: }</pre> </pre> <blockquote></blockquote> <p>鎵撳嵃瀛愮被鐨勯潤(rùn)鎬佸彉閲忥紝鎵鏈夌殑浠g爜閮戒細(xì)鎵ц</p> <pre style="border: 1px solid #c0c0c0; padding: 5px; background-color: #f0f0f0; min-height: 40px; width: 650px; overflow: auto;"> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 2: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> ClassLoad {<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 3: <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> ClassNotFoundException {<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 4: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 5: <span style="color: #008000;">//Son son = new Son();</span><br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 6: <span style="color: #008000;">/**<br /> </span></pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 7: * 鎴戜滑浣跨敤涓涓被鐨勬椂鍊欓渶瑕佽繘琛屼互涓嬶紦欏瑰伐浣滐紟<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 8: * 1.鍔犺澆錛?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 9: * 2.閾炬帴<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 10: * 3.鍒濆鍖栵紝姝ゆ浼?xì)鍒濆鍖栭潤(rùn)鎬佸彉閲忓拰鎵ц闈?rùn)鎬佸潡淇℃伅錛屼絾鏄繖縐嶆柟娉曚細(xì)鍦?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 11: * 鐪熸璋冪敤鏂規(guī)硶鏃舵墽琛?br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 12: */<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 13: Class son = Son.<span style="color: #0000ff;">class</span>;<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 14: System.out.println("<span style="color: #8b0000;">闈?rùn)鎬佸尯鐨勫垵濮嬪寲浼?xì)鍦ㄨ皟鐢ㄦ椂鎵ц锛?/span>");<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 15: <span style="color: #008000;">// parntFLAG 鏄埗綾葷殑闈?rùn)鎬佸彉閲忋</span><br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 16: <span style="color: #008000;">// 姝ゅ鍙細(xì)鎵ц鐖剁被鐨勯潤(rùn)鎬佸揩</span><br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 17: System.out.println(Son.<font color="#ff0000">sonFLAG</font>);<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 18: <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 19: <span style="color: #008000;">/**<br /> </span></pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 20: * 榪愯緇撴灉<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 21: * 闈?rùn)鎬佸尯鐨勫垵濮嬪寲浼?xì)鍦ㄨ皟鐢ㄦ椂鎵ц锛?br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 22: * 鎴戝湪鐖剁被闈?rùn)鎬佸尯閲岄潰錛佺埗綾婚潤(rùn)鎬佸彉閲?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 23: * 鎴戝湪瀛愮被闈?rùn)鎬佸尯閲岄潰錛佸瓙綾葷被闈?rùn)鎬佸彉閲?br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 24: * 瀛愮被綾婚潤(rùn)鎬佸彉閲?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 25: */<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 26: }<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 27: }</pre> </pre> <p> </p> <p>浣嗘槸浣跨敤Class.forName 綾誨姞杞芥椂灝變細(xì)瀹屾垚鍒濆鍖栧伐浣滐紟</p> <pre style="border: 1px solid #c0c0c0; padding: 5px; background-color: #f0f0f0; min-height: 40px; width: 650px; overflow: auto;"> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> ClassLoad {<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 2: <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 {<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 3: <span style="color: #008000;">/**<br /> </span></pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 4: * 浣跨敤Class.forName浼?xì)鑷姩鍔犺浇鎵鏈夐潤(rùn)鎬佸尯鐨勪俊鎭?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 5: */<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 6: Class son = Class.forName("<span style="color: #8b0000;">classLoad.Son</span>");<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 7: Son instance = (Son)son.newInstance();<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 8: <span style="color: #008000;">/*<br /> </span></pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 9: * 鎵ц緇撴灉<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 10: * 鎴戝湪鐖剁被闈?rùn)鎬佸尯閲岄潰錛佺埗綾婚潤(rùn)鎬佸彉閲?br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 11: * 鎴戝湪瀛愮被闈?rùn)鎬佸尯閲岄潰錛佸瓙綾葷被闈?rùn)鎬佸彉閲?br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 12: * 鎴戝湪鐖剁被鏋勯犲嚱鏁伴噷闈紒<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 13: * 鎴戝湪瀛愮被鏋勯犲嚱鏁伴噷闈紒<br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 14: */ <br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 15: <br /> </pre> <pre style="background-color: #e1e1e1; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 16: }<br /> </pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 17: }</pre> </pre> <img src ="http://m.tkk7.com/lichen6928/aggbug/346154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/lichen6928/" target="_blank">灝忔櫀</a> 2011-03-13 18:41 <a href="http://m.tkk7.com/lichen6928/archive/2011/03/13/346154.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>ThreadLocalhttp://m.tkk7.com/lichen6928/archive/2009/05/14/270702.html灝忔櫀灝忔櫀Thu, 14 May 2009 13:03:00 GMThttp://m.tkk7.com/lichen6928/archive/2009/05/14/270702.htmlhttp://m.tkk7.com/lichen6928/comments/270702.htmlhttp://m.tkk7.com/lichen6928/archive/2009/05/14/270702.html#Feedback0http://m.tkk7.com/lichen6928/comments/commentRss/270702.htmlhttp://m.tkk7.com/lichen6928/services/trackbacks/270702.html璇ョ被鎻愪緵浜?jiǎn)绾拷E嬪眬閮?(thread-local) 鍙橀噺銆傝繖浜涘彉閲忎笉鍚屼簬瀹冧滑鐨勬櫘閫氬搴旂墿錛屽洜涓鴻闂煇涓彉閲忥紙閫氳繃鍏?get 鎴?set 鏂規(guī)硶錛夌殑姣忎釜綰跨▼閮芥湁鑷繁鐨勫眬閮ㄥ彉閲忥紝瀹冪嫭绔嬩簬鍙橀噺鐨勫垵濮嬪寲鍓湰銆俆hreadLocal 瀹炰緥閫氬父鏄被涓殑 private static 瀛楁錛屽畠浠笇鏈涘皢鐘舵佷笌鏌愪竴涓嚎紼嬶紙渚嬪錛岀敤鎴?ID 鎴栦簨鍔?ID錛夌浉鍏寵仈銆?

榪欎釜鏄粈涔堬紝灝辨槸瑙e喅涓涓嚎紼嬪唴鍏變韓涓涓彉閲忥紝榪欎釜鍙橀噺鍙湪榪欎釜綰跨▼鍐呴儴鏈夋晥錛屽湪涓涓嚎紼嬪唴璁塊棶鐨勯兘涓涓悓涓涓璞★紝鑰屽涓嚎紼嬩箣闂寸殑榪欎釜瀵硅薄鍗存槸鐩鎬簰鐙珛鐨勩傝鏉ュ氨鏄瘡涓涓嚎紼嬮兘鏈変竴涓嫭绔嬬殑姝ょ嚎紼嬪壇鏈?br>浣跨敤ThreadLocal涓鑸兘澹版槑涓洪潤(rùn)鎬佺殑鍙橀噺
鍦ㄦ垜浠殑綰跨▼涓湁涓涓猼hreadLocals鐨凥ash琛ㄦ潵瀛樻斁榪欎釜瀵硅薄錛屾垜浠敤ThreadLocal瀵硅薄浣滀負(fù)涓婚敭錛屽洜姝ゆ垜浠殑ThreadLocal瀵硅薄澹版槑涓洪潤(rùn)鎬佺殑

鎴戜滑鍙互浣跨敤澶氫釜TheadLocal錛屾潵浣夸竴涓嚎紼嬮噷鏈夊涓叡浜殑鍙橀噺
榪欎釜灝辨槸瑕佸疄鐜頒竴涓嚎紼嬮噷闈㈠叡浜竴涓彉閲?pre>public void set(Object value) { Thread t = Thread.currentThread(); ThreadLocalMap map = getMap(t); if (map != null) map.set(this, value); else createMap(t, value); }

 

    ThreadLocalMap getMap(Thread t) {
        return t.threadLocals;
    }


灝忔櫀 2009-05-14 21:03 鍙戣〃璇勮
]]>
淇敼IE涓殑HTTP璇鋒眰鏃墮棿http://m.tkk7.com/lichen6928/archive/2009/05/14/270699.html灝忔櫀灝忔櫀Thu, 14 May 2009 12:56:00 GMThttp://m.tkk7.com/lichen6928/archive/2009/05/14/270699.htmlhttp://m.tkk7.com/lichen6928/comments/270699.htmlhttp://m.tkk7.com/lichen6928/archive/2009/05/14/270699.html#Feedback0http://m.tkk7.com/lichen6928/comments/commentRss/270699.htmlhttp://m.tkk7.com/lichen6928/services/trackbacks/270699.html 

1. 娣誨姞甯︽湁鏁版嵁鍊?(< 嬈℃暟縐?>) ReceiveTimeout DWORD 鍊?*錛?鍦ㄤ互涓嬫敞鍐岃〃欏逛腑

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
渚嬪, 濡傛灉甯屾湜瓚呮椂鏈熼棿灝?8 鍒嗛挓, ReceiveTimeout 鏁版嵁鍊艱緗負(fù) 480000 (< 480 > 1000錛?銆?

 
2. 閲嶆柊鍚姩璁$畻鏈恒?br>璇︽儏



灝忔櫀 2009-05-14 20:56 鍙戣〃璇勮
]]>
pb 璋冪敤dll鏂囦歡http://m.tkk7.com/lichen6928/archive/2009/05/14/270697.html灝忔櫀灝忔櫀Thu, 14 May 2009 12:48:00 GMThttp://m.tkk7.com/lichen6928/archive/2009/05/14/270697.htmlhttp://m.tkk7.com/lichen6928/comments/270697.htmlhttp://m.tkk7.com/lichen6928/archive/2009/05/14/270697.html#Feedback0http://m.tkk7.com/lichen6928/comments/commentRss/270697.htmlhttp://m.tkk7.com/lichen6928/services/trackbacks/270697.htmlLiveJournal Tags:

MICROSOFT         PB(16Bit)         PB(32Bit)

Bool                    Boolean         Boolean

Char*                 Ref string       Ref String

Colorref               Uint             Ulong

Dword                 Uint             Ulong

Handle                Uint             Ulong

Hdc                    Uint             Ulong

Hfile                   Uint             Ulong

Hinstance           Uint             Ulong

Hwnd                 Uint             Ulong

Int                     Int             Int

Lparam               Uint             Ulong

Lpbyte               Ref Int         Ref Long

Lpdword             Ref Uint        Ref Ulong

Lpfiletime           Ref Time        Ref Time

Lpint                 Ref Int          Ref Long

Lpstr,Lpststr       Ref String     Ref String

Lpvoid               Ref Structstruct_inst         Ref Struct struct_inst

Mcierror            Long             Long

Lpstr,Lpststr       Ref String     Ref String

Lpvoid              Ref Structstruct_inst         Ref Struct struct_inst

Pbyte               Ref Int[#]     Ref Long[#]

Short               Int         Int

Structure         Ref Struct struct_inst       Ref Struct Struct_inst

Uint                Uint              Uint

Void**           SUBROUTINE    SUBROUTINE

Word                         Int       Ulong

 

LiveJournal Tags:

 

Catch0 

pb鑳戒嬌鐢ㄧ殑蹇呴』鏄爣鍑唚inapi鍗硃asical 鍘嬫爤欏哄簭

  1. 鍒朵綔dll鏂囦歡鏃?闇瑕乻tdcal
  2. 鍦ㄥ嚱鏁頒腑鍔犲叆winapi

eg錛?/p>

DLLIMPORT WINAPI int CI_MACForPb(
              long           nFunction,      
              unsigned char  *pEntity,     
              unsigned char  *pInData,
              unsigned long  nInLength,
              unsigned char  *pMAC,
              unsigned long  *pnMACLength
              )


灝忔櫀 2009-05-14 20:48 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲色成人网站WWW永久| 免费三级毛片电影片| 国产一级淫片视频免费看| 男人天堂2018亚洲男人天堂| 在线人成精品免费视频| 亚洲黄网站wwwwww| 蜜桃AV无码免费看永久| 亚洲高清免费在线观看| 亚洲高清免费在线观看| 亚洲免费中文字幕| 最近最好的中文字幕2019免费 | 免费日本黄色网址| 免费高清A级毛片在线播放| 亚洲成A∨人片天堂网无码| 特级av毛片免费观看| 精品国产日韩亚洲一区| 特级做A爰片毛片免费看无码 | 亚洲性日韩精品一区二区三区 | 午夜爱爱免费视频| 日韩少妇内射免费播放| 中文字幕亚洲第一| 久9热免费精品视频在线观看| 亚洲国产精品自在在线观看 | 5555在线播放免费播放| 亚洲一区二区观看播放| 四虎成人精品在永久免费| 国产伦精品一区二区免费| 亚洲Av熟妇高潮30p| 免费A级毛片无码免费视| 美女视频黄视大全视频免费的| 国产亚洲精品AA片在线观看不加载| a级毛片免费网站| 91在线亚洲精品专区| 日本免费一本天堂在线| 西西人体免费视频| 亚洲精品午夜国产va久久| 久久精品亚洲乱码伦伦中文| 67194国产精品免费观看| 亚洲国产成人久久综合| 在线亚洲午夜理论AV大片| 亚洲爆乳成av人在线视菜奈实|