锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲视频电影在线,在线一级成人,天天综合avhttp://www.aygfsteel.com/JafeLee/category/24815.htmlzh-cnTue, 28 Aug 2007 01:26:20 GMTTue, 28 Aug 2007 01:26:20 GMT60Puzzlers with Character (1)http://www.aygfsteel.com/JafeLee/archive/2007/08/26/139649.htmlJafeJafeSun, 26 Aug 2007 14:53:00 GMThttp://www.aygfsteel.com/JafeLee/archive/2007/08/26/139649.htmlhttp://www.aygfsteel.com/JafeLee/comments/139649.htmlhttp://www.aygfsteel.com/JafeLee/archive/2007/08/26/139649.html#Feedback0http://www.aygfsteel.com/JafeLee/comments/commentRss/139649.htmlhttp://www.aygfsteel.com/JafeLee/services/trackbacks/139649.htmlPuzzle 11:
LastLaugh.java
浣?+ 鍜宑har鍨嬪悓鏃跺嚭鐜扮殑鏃跺欙紝鍒嗘竻榪愮畻鏄瓧絎︿覆榪炴帴榪愮畻榪樻槸綆鍗曠殑綆楁湳榪愮畻銆?br />JSL 5.1.2銆?.6.2
Puzzle 12:
Abc.java
鍏充簬鏁扮粍鐨勶紝鍙傝JSL 10


Jafe 2007-08-26 22:53 鍙戣〃璇勮
]]>
Expressive Puzzlers (2)http://www.aygfsteel.com/JafeLee/archive/2007/08/23/138900.htmlJafeJafeThu, 23 Aug 2007 09:56:00 GMThttp://www.aygfsteel.com/JafeLee/archive/2007/08/23/138900.htmlhttp://www.aygfsteel.com/JafeLee/comments/138900.htmlhttp://www.aygfsteel.com/JafeLee/archive/2007/08/23/138900.html#Feedback0http://www.aygfsteel.com/JafeLee/comments/commentRss/138900.htmlhttp://www.aygfsteel.com/JafeLee/services/trackbacks/138900.htmlPuzzle 8:
DosEquiz.java

榪欎釜璋滈鏄叧浜?Conditional Operator ? :[JLS 15.25]銆?br />1銆丆onditional Operator 鏈変笁涓繍綆楃琛ㄨ揪寮忥紝絎竴涓繀欏繪槸 boolean鎴?Boolean鍨嬬殑錛屽惁鍒欏紩鍙戜竴涓猚ompile-time error 銆?br />2銆佷竴涓?Conditional Expression鐨勭被鍨婽鏄敱絎簩涓〃杈懼紡 T2鍜岀涓変釜琛ㄨ揪寮廡3鐨勭被鍨嬫潵鍐沖畾鐨勩傚叿浣撹鍒欏涓嬶細
  • rule 1:聽 濡傛灉T2 == T3錛堝寘鎷琓2 == T3 == null鐨勬儏鍐碉級錛岄偅涔?T = T2錛圱3錛夈?/li>
  • rule 2:聽 濡傛灉 T2涓嶵3榪欎袱涓箣涓湁涓涓槸boolean鍨嬶紝鍙﹀涓涓槸Boolean鍨嬶紝閭d箞 T = boolean銆?/li>
  • rule 3:聽 濡傛灉T2涓嶵3涔嬩腑鏈変竴涓槸null綾誨瀷錛岃屽彟澶栦竴涓槸涓涓紩鐢ㄧ被鍨?reference type) RT錛岄偅涔圱 = RT
  • 濡傛灉T2涓嶵3鏄彲浠ヨ漿鍖栨垚鏁板肩被鍨嬬殑錛岄偅涔堢粨鏋滄湁浠ヤ笅鍑犵鎯呭喌錛?/li>
    1. rule 4:聽 濡傛灉T2涓嶵3鏈変竴涓槸byte鎴栬匓yte錛屽彟涓涓槸short鎴栬匰hort錛岄偅涔圱 = short
    2. rule 5:聽 濡傛灉T2涓嶵3涓湁涓涓槸 GT 鍨嬶紝榪欓噷 GT 娉涙寚byte, short, char涓殑浠諱綍涓涓? 鑰屼笖鍙︿竴涓槸涓涓猧nt鍨嬬殑甯擱噺琛ㄨ揪寮?娉ㄦ剰錛屽繀欏繪槸涓涓?int鍨嬬殑constant expression)錛岃屼笖 璇ュ父閲忚〃杈懼紡鍙互鐢℅T琛ㄧず錛堝嵆涓嶄細浜х敓綺懼害鎹熷け鐨勬儏鍐碉紝涓漢鐨勭悊瑙_^錛夛紝鍒橳=GT銆?/li>
    3. rule 6錛?濡傛灉T2鍜孴3鏈変竴涓槸Byte鍨嬶紝鍙︿竴涓槸鍙互鐢╞yte鍨嬭〃紺虹殑int鍨嬪父閲忚〃杈懼紡錛岄偅涔圱=byte
    4. rule 7錛?濡傛灉T2鍜孴3鏈変竴涓槸Short鍨嬶紝鍙︿竴涓槸鍙互鐢╞yte鍨嬭〃紺虹殑int鍨嬪父閲忚〃杈懼紡錛岄偅涔圱=short
    5. rule 8錛?濡傛灉T2鍜孴3鏈変竴涓槸Character鍨嬶紝鍙︿竴涓槸鍙互鐢╟har鍨嬭〃紺虹殑int鍨嬪父閲忚〃杈懼紡錛岄偅涔圱=char
    6. rule 9:聽 Otherwise, binary numeric promotion (JLS 5.6.2) is applied to the operand types, and the type of the conditional expression is the promoted type of the second and third operands. Note that binary numeric promotion performs unboxing conversion (JLS 5.1.8) and value set conversion (JLS 5.1.13).(榪欎釜寰堝璇嶈閮戒笉鐭ヨ鎬庝箞緲昏瘧錛屽氨鐩存帴copy榪囦簡銆傘傘傦級
  • rule 10:聽 Otherwise, the second and third operands are of types S1 and S2 respectively. Let T1 be the type that results from applying boxing conversion to S1, and let T2 be the type that results from applying boxing conversion to S2. The type of the conditional expression is the result of applying capture conversion (JLS 5.1.10) to lub(T1, T2) (JLS 15.12.2.7).


Puzzle 9:
Tweedledum.java
鍏充簬Compound Assignment Operators錛屽弬瑙丣LS 15.26.2.
Puzzle 10:
Tweedledee.java



Jafe 2007-08-23 17:56 鍙戣〃璇勮
]]>
Expressive Puzzlers (1)http://www.aygfsteel.com/JafeLee/archive/2007/08/11/136015.htmlJafeJafeSat, 11 Aug 2007 05:46:00 GMThttp://www.aygfsteel.com/JafeLee/archive/2007/08/11/136015.htmlhttp://www.aygfsteel.com/JafeLee/comments/136015.htmlhttp://www.aygfsteel.com/JafeLee/archive/2007/08/11/136015.html#Feedback0http://www.aygfsteel.com/JafeLee/comments/commentRss/136015.htmlhttp://www.aygfsteel.com/JafeLee/services/trackbacks/136015.htmlPuzzle 1:

褰撴眰浣欒繍綆?remainder operation)絎?% 榪斿洖涓涓潪闆朵綑鏁版椂錛屼綑鏁扮殑絎﹀彿浣嶅拰宸﹁竟鎿嶄綔鏁扮殑絎﹀彿浣嶇浉鍚屻備緥濡?div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;">聽聽聽聽聽聽聽聽System.out.println((-53)%9);聽//聽-8
聽聽聽聽聽聽聽聽System.out.println(53%(-9));聽//8
聽聽聽聽聽聽聽聽System.out.println((-53)%(-9));聽//-8
Puzzle 2:

Change.java

鍏充簬嫻偣鏁扮殑浜岃繘鍒惰〃紺猴綖锝?br />錛?錛変簩榪涘埗嫻偣鏁板茍涓嶈兘綺劇‘琛ㄧず鎵鏈夌殑灝忔暟
錛?錛夊璁$畻綺懼害瑕佹眰姣旇緝鍑嗙‘錛堜緥濡傞噾铻嶈綆楋級鏃訛紝涓嶈浣跨敤float鍜宒ouble錛屽敖閲忎嬌鐢╥nt, long錛孊igDecimal.
錛?錛夋帹鑽愰槄璇繪枃绔狅細What Every Computer Scientist Should Know About Floating-Point Arithmetic
緗戜笂寰堝鍦版柟閮芥湁鐨勩傚彟涓鏈墰涔?Computer Systems A Programmers's Perspective涓婁篃鏈夎嫻偣鏁?br />錛?錛塉LS 3.10.1鐢辮鑼冨彲鐭?0.1, .1, 1. 閮芥槸鍚堟硶鐨勬誕鐐規暟銆傞渶瑕佹敞鎰忕殑鏄湪java涓紝嫻偣鏁版湁涓ょ鍘熺敓綾誨瀷float,double錛屽綋嫻偣鏁扮殑鍚庣紑鏄疐鎴栬協鏃訛紝璇ユ誕鐐規暟涓篺loat綾誨瀷錛屾病鏈夊悗緙鎴栬呭悗緙鏄疍鎴栬卍鏃訛紝璇ユ誕鐐規暟鏄痙ouble綾誨瀷鐨勩傛敞鎰忎笅闈㈢殑渚嬪瓙
FloatPoint.java

緇撴灉錛?br />
緇撴灉

Puzzle 3:
闇瑕佹敞鎰廽ava鏄浣曞鐞嗘暣鏁版孩鍑虹殑錛岀湅涓嬮潰鐨勪緥瀛愬氨涓鐩簡鐒朵簡錛屽埆蹇樹簡long鏄?8 bytes錛宨nt鏄?4 bytes鐨剘~
LongDividion.java

Puzzle 4:
娣誨姞long鍨嬫暣鏁扮殑鍚庣紑鏃惰浣跨敤L閬垮厤鐢╨錛屽悓鏍蜂笉瑕佸崟鐙嬌鐢ㄥ皬鍐欏瓧姣峫浣滀負鍙橀噺鍚嶏紝鐞嗙敱鏄樉鑰屾槗瑙佺殑錛歭鍜?鍦ㄥぇ澶氭暟瀛椾綋涓お闅懼尯鍒嗐?br />
Puzzle 5:
錛?錛夊拰鍗佽繘鍒舵暟涓嶅悓錛屽綋鍗佸叚榪涘埗銆佸叓榪涘埗鏁扮殑鏈楂樹綅鏄?鏃訛紝琛ㄧず瀹冩槸涓涓礋鏁幫紙鍦ㄥ崄榪涘埗鏁頒腑錛岃〃紺轟竴涓礋鏁拌鏄懼紡浣跨敤絎﹀彿-)
錛?錛夊敖閲忛伩鍏嶆販鍚堢被鍨嬭繍綆楋紝渚嬪鏈緥涓殑 long鍨嬪拰int鍨嬬殑鍔犳硶錛屽湪java涓紝涓涓暣鏁板鏋滄病鏈夊悗緙L鎴杔錛屽垯瀹冩槸涓涓猧nt鍨嬭屼笉鏄痩ong鍨嬨?div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;">JoyOfHex.java
Puzzle 6:
The rule "Sign extension is performed if the type of the original value is signed; zero extension if it is a char, regardless of the type to which it is being converted" describes the sign extension behavior when converting from narrower integral types to wider.

Multicast.java
Puzzle 6:
JLS 15.7 Evaluation Order
CleverSwap.java



Jafe 2007-08-11 13:46 鍙戣〃璇勮
]]>
Java 瑙f儜錛堣嫳鏂囩増錛?/title><link>http://www.aygfsteel.com/JafeLee/archive/2007/08/11/136005.html</link><dc:creator>Jafe</dc:creator><author>Jafe</author><pubDate>Sat, 11 Aug 2007 04:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/JafeLee/archive/2007/08/11/136005.html</guid><wfw:comment>http://www.aygfsteel.com/JafeLee/comments/136005.html</wfw:comment><comments>http://www.aygfsteel.com/JafeLee/archive/2007/08/11/136005.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/JafeLee/comments/commentRss/136005.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/JafeLee/services/trackbacks/136005.html</trackback:ping><description><![CDATA[ <table style="margin-top: 16px;" border="0" cellpadding="0" cellspacing="0" height="206" width="733"> <tbody> <tr> <td>銆愬師 涔?鍚嶃?</td> <td> Java Puzzlers錛歍raps錛孭itfalls錛宎nd Corner Cases </td> </tr> <tr> <td>銆愬師鍑虹増紺俱?</td> <td>Addison-Wesley</td> </tr> <tr> <td>銆愪綔銆銆鑰呫?/td> <td>錛堢編錛塉oshua Bloch, Neal Gafter聽<span></span></td> </tr> <tr> <td>銆愪笡 涔?鍚嶃?</td> <td>鍏歌棌鍘熺増涔﹁嫅</td> </tr> <tr> <td>銆愬嚭 鐗?紺俱?</td> <td> <!--<a href="/search/power_search/power_search.asp?key1=浜烘皯閭數鍑虹増紺? target=_blank></a> --> 浜烘皯閭數鍑虹増紺?/td> </tr> <tr> <td>銆愪功 鍙楓?/td> <td>7115149569</td> </tr> <tr> <td>銆愬紑 鏈?/td> <td>16寮</td> </tr> <tr> <td>銆愰〉 鐮併?/td> <td>282</td> </tr> <tr> <td>銆愬嚭鐗堟棩鏈熴?/td> <td>2006騫?鏈?/td> </tr> <tr> <td>銆愮増 嬈°?/td> <td>1-1<br /></td> </tr> <tr> <td valign="top"> <br /> </td> <td valign="top"> <br /> </td> </tr> </tbody> </table> <br />寰堜笉閿欑殑涓鏈功錛屾瘡涓棶棰樼瘒騫呯煭灝忥紝闂鐭ヨ瘑鎬у緢寮猴紝鍚屾椂鍙堜笉涔忚叮鍛蟲э綖锝?br />緗戜笂寰堝鍦版柟閮芥湁鐢靛瓙鐗堜笅杞斤紝鍖呮嫭www.flazx.com<br />btw錛孞oshua Block鏄?Effective Java鐨勪綔鑰?br /><br /><img src ="http://www.aygfsteel.com/JafeLee/aggbug/136005.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/JafeLee/" target="_blank">Jafe</a> 2007-08-11 12:40 <a href="http://www.aygfsteel.com/JafeLee/archive/2007/08/11/136005.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">花莲市</a>| <a href="http://" target="_blank">尼木县</a>| <a href="http://" target="_blank">余江县</a>| <a href="http://" target="_blank">双城市</a>| <a href="http://" target="_blank">南汇区</a>| <a href="http://" target="_blank">开平市</a>| <a href="http://" target="_blank">陆川县</a>| <a href="http://" target="_blank">武邑县</a>| <a href="http://" target="_blank">瓦房店市</a>| <a href="http://" target="_blank">延川县</a>| <a href="http://" target="_blank">普兰县</a>| <a href="http://" target="_blank">营山县</a>| <a href="http://" target="_blank">新乡市</a>| <a href="http://" target="_blank">黄骅市</a>| <a href="http://" target="_blank">皋兰县</a>| <a href="http://" target="_blank">年辖:市辖区</a>| <a href="http://" target="_blank">普洱</a>| <a href="http://" target="_blank">蚌埠市</a>| <a href="http://" target="_blank">阿拉尔市</a>| <a href="http://" target="_blank">乐清市</a>| <a href="http://" target="_blank">彩票</a>| <a href="http://" target="_blank">桦南县</a>| <a href="http://" target="_blank">五指山市</a>| <a href="http://" target="_blank">神木县</a>| <a href="http://" target="_blank">白城市</a>| <a href="http://" target="_blank">洛宁县</a>| <a href="http://" target="_blank">砚山县</a>| <a href="http://" target="_blank">南郑县</a>| <a href="http://" target="_blank">南皮县</a>| <a href="http://" target="_blank">稷山县</a>| <a href="http://" target="_blank">洞头县</a>| <a href="http://" target="_blank">虎林市</a>| <a href="http://" target="_blank">潼南县</a>| <a href="http://" target="_blank">和硕县</a>| <a href="http://" target="_blank">万荣县</a>| <a href="http://" target="_blank">库车县</a>| <a href="http://" target="_blank">紫阳县</a>| <a href="http://" target="_blank">禹城市</a>| <a href="http://" target="_blank">吉林市</a>| <a href="http://" target="_blank">中卫市</a>| <a href="http://" 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>