锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一级毛片免费观看,亚洲欧洲国产视频,亚洲成年人在线观看http://m.tkk7.com/kinoviti/category/5123.htmlzh-cnWed, 28 Feb 2007 03:12:12 GMTWed, 28 Feb 2007 03:12:12 GMT60AJAX Web Tree 鏋勫緩鏂規(guī)鍙?qiáng)瀹炵幇鎬濇兂http://m.tkk7.com/kinoviti/archive/2006/01/27/29304.html-=Kino=--=Kino=-Fri, 27 Jan 2006 08:42:00 GMThttp://m.tkk7.com/kinoviti/archive/2006/01/27/29304.htmlhttp://m.tkk7.com/kinoviti/comments/29304.htmlhttp://m.tkk7.com/kinoviti/archive/2006/01/27/29304.html#Feedback3http://m.tkk7.com/kinoviti/comments/commentRss/29304.htmlhttp://m.tkk7.com/kinoviti/services/trackbacks/29304.html***************************************
鍏抽敭瀛楋細(xì)AJAX,Tree,Struts錛孌OM
闅炬槗搴︼細(xì) 涓?BR>杞歡鐗堟湰錛歴truts 1.2.8
鏃墮棿錛?006-01-27
Author錛欿ino
***************************************


鍓嶉樀瀛愬啓浜嗕竴涓皬浠g爜澶勭悊AJAX涓媁ebTree鐨勬瀯寤猴紝鍏朵腑紕板埌浜嗕竴浜涢棶棰橈紝涔熸湁涓浜涙兂娉曪紝鐜板湪璇村嚭鏉ュ笇鏈涘ぇ瀹朵竴璧風(fēng)湅鐪嬶紝濡傛灉妗堢敱闂璇蜂笉鍚濊祼鏁欙紝鏈漢涓嶈儨鎰熸縺鍟娿?BR>
鑳屾櫙錛?BR>榪欐鍥犱負(fù)鏄姞杞藉湪Struts涓婄殑寮鍙戯紝W(xué)eb欏甸潰涓婄殑Tree浣淎JAX澶勭悊錛屽洜涓烘湁Node鐨勫鍒犳敼鎿嶄綔銆係erver绔洜涓鴻鍜學(xué)ebService榪炴帴錛屾墍浠ヤ笉鍋欳ache銆?BR>
瑙e喅妗堬細(xì)
1銆備嬌鐢≒olling璋冪敤AJAX瀹氭湡鏇存柊Tree銆?BR>2銆侫JAX璁塊棶鐨勫湴鍧鏄竴涓狝ction錛堜緥錛歝reatetree.do錛夈傜敤鏉ヨ繑鍥濼ree妯″瀷鎴栬呴敊璇秷鎭紙鍥介檯鍖栵級(jí)銆?BR>3銆侭rowser瑙f瀽XML鐨凾reeModel銆?BR>4銆傚湪Browser姣旇緝鏂版棫2涓猅reeModel錛屽畬鎴愰変腑鐘舵佺殑緇ф壙銆?BR>5銆侰SS娓叉煋TreeNode銆?BR>
浠ヤ笂鏄畝鍗曠殑鎬濊礬銆備紶緇熺殑AJAX搴旇鏄敖閲忓噺灝慩Ml浼犺緭閲忥紝榪簬娌℃湁Cache鐨勭紭鏁咃紝騫朵笖WS緇欐垜鐨勮妭鐐瑰茍涓嶈兘綆鍗曠殑寰楀埌鐖跺瓙鍏崇郴銆傛垜閫夋嫨浜嗭紝姣忔Polling鏇存柊鏁存5鏍?wèi)鐨勬栆?guī)銆傛ц兘鏈祴銆?BR>
鎴戣繖嬈″湪web server 绔瀯寤篢ree鏃剁洿鎺ョ敤娣卞害浼樺厛杞崲鎴怷ML銆俋Ml涓暟鎹殑鍏堝悗欏哄簭鍐沖畾浜員ree浠庣埗鍒板瓙錛屼粠鍏勫埌寮熺殑娣卞害浼樺厛鍏崇郴錛宨ndent鍐沖畾浜嗘繁搴︼紙涔熷氨鏄緝榪涳級(jí)銆傝繖鏍鋒垜浠嶴erver绔紶鍏ョ殑涔熷氨鎴愪簡涓涓爣鍑嗙殑Tree鏄劇ずModel銆傛牸寮忓畾涔夊涓嬨?BR>  * Gobal Master Tree DTD
 * &lt!ELEMENT tree (tree*)&gt
 * &lt!ATTLIST tree
 *  id   CDATA #REQUIRED LoctionInfo's toString
 *  indent  CDATA #REQUIRED Tree's Level
 *  text        CDATA   #REQUIRED label in html
 *  tooltip     CDATA   #IMPLIED title in html
 *  action      CDATA   #IMPLIED href in html
 *  icon        CDATA   #IMPLIED close icon with the node status
 *  openicon    CDATA   #IMPLIED open icon with the node status
 *  open        CDATA   #IMPLIED&gt node's open states ,default is false in server.
 *  target  CDATA #IMPLIED node's open target
 *
<span id="maintree">
 <tree id="Ajax" indent=0 text="Root" tooltip="Root" action="/logout.do" icon="" openicon= "" open="false"/>
 <tree id="110" indent=1 text="Node 1" tooltip="Node 1" action="/logout.do" icon="" openicon= "" open="false"/>
 <tree id="120" indent=2 text="Node 2" tooltip="Node 2" action="/logout.do" icon="" openicon= "" open="false"/>
 <tree id="12580" indent=2 text="Node 3" tooltip="Node 3" action="/logout.do" icon="" openicon= "" open="false"/>
 <tree id="user" indent=1 text="Node 4" tooltip="Node 4" action="/logout.do" icon="" openicon= "" open="false"/>
</span>

涓婅竟鐨?Tree鏄劇ず鍑烘潵濡備笅
Root
 鈹?BR> 鈹淣ode 1
 鈹?nbsp;   鈹?BR> 鈹?nbsp;   鈹淣ode 2
 鈹?nbsp;   鈹擭ode 3
 鈹擭ode 4
indent   灝辨槸緙╄繘銆?BR>鏁版嵁鐨勫厛鍚庨『搴忓氨鏄繁搴︿紭鍏堢殑閬嶅巻欏哄簭銆?BR>

榪欐牱鐨勬暟鎹埌浜咮rowser錛屼細(xì)鍏堣杞垚涓涓璞℃暟緇勩?BR>

 1// Tree Node object
 2// This function creates a node in the tree with the following arguments:
 3//    sId         - The node's index within the global nodes_array
 4//    iIndent    - The level within the tree hierarchy (0 = top)
 5//    sText      - The text displayed in the tree for this node
 6//    sTooltip     - the tool tip
 7//    oAction   - For a document, the address it will display when clicked
 8//    sIcon        - the node's icon 
 9//    sIconOpen    - the node's icon state
10//      bOpen - true  false
11function GMTreeNode(sId,iIndent,sText,sTooltip,sAction,sIcon,sIconOpen,bOpen,sTarget)
12{
13    if (sId) this.id = sId;
14    if (iIndent) this.indent = iIndent;
15    if (sText) this.text = sText;
16    if (sAction) this.action = sAction;
17    if (sTooltip) this.tooltip = sTooltip;
18    if (sIcon) this.icon = sIcon;
19    if (sIconOpen) this.iconopen = sIconOpen;
20    if (bOpen) this.open = bOpen;
21    if (sTarget) this.target = sTarget;
22    
23//    //alert(this.id + "  " + this.indent + "  " + this.text + "  " + this.action + "  " + 
24//    this.tooltip + "  " + this.icon + "  " + this.iconopen + "  " + this.open);
25}

鐒跺悗浼?xì)鍜屾鍦ㄦ槃·虹殑Tree鏁扮粍 榪涜涓涓?姣旇緝錛岀敤浜庡啓鍏ュ睍寮鐘舵侊紝浠g爜濡備笅錛?BR>
 1/////////////////////////////////
 2//    >>>Compare 
 3//    compare maintree with maintree. and copy maintree to maintree
 4/////////////////////////////////
 5function compareTreeModel()
 6{
 7    //alert("I am here in compareTreeModel");
 8    if (ajaxtree.length <= 0){
 9        alert("ajaxtree is null");//TODO
10        return;
11    }

12    
13    if (maintree.length <= 0){
14        //alert("maintree is null");
15        maintree = ajaxtree;
16        return;
17    }

18    //compare start
19    //var maxlen = Math.max(ajaxtree.length,maintree.length);
20    for(var i=0;i<ajaxtree.length;i++)
21    {
22        for(var j=0;j<maintree.length;j++)
23        {
24            if (ajaxtree[i].id == maintree[j].id)
25            {
26                ajaxtree[i].open = maintree[j].open;
27                break;
28            }

29        }
    
30    }

31    
32    maintree = ajaxtree;
33    
34}
maintree 灝辨槸姝e湪鏄劇ず鐨?Tree錛宎jaxtree鏄垰寰楀埌鐨勬柊Tree銆?涓璞¢兘鏄疶reeNode鐨勬暟緇勩傝孴reeNode瀵硅薄鐨凮pen灞炴у嵆璁板綍浜嗚妭鐐圭殑灞曞紑鐘舵併傞偅涔堣繖閲屽氨瀵硅繖涓妭鐐圭姸鎬佽繘琛屸滅Щ妞嶁濓紝瀹屾瘯鍚庯紝鎶婃柊Tree妯″瀷浜や粯鏄劇ず鏂規(guī)硶錛屼篃灝辨槸ToHtml鏂規(guī)硶銆?BR>
杞崲Html閮ㄥ垎綆楁槸涓涓瘮杈冨鏄撳嚭bug鐨勫嵄闄╃偣銆?BR>
棣栧厛鍒嗘瀽涓涓嬶紝鐢熸垚鐨勪唬鐮佹槸浠涔堟牱瀛愮殑銆?BR>榪欓噷浠嶇劧鐢ㄤ笂杈圭殑閭f5鏍?wèi)浣滀緥瀛愩?BR>鐢熸垚鐨凞OM緇撴瀯搴旇鏄?BR><div 鐖?gt;
    <div  鏀剁緝>
    <img  鎶樼嚎  />
    <img  鍥炬爣 />
    <a 鑺傜偣鍔ㄤ綔>鑺傜偣Label</a>
    <div 瀛?gt;
        ....閫掑綊鐨勬瀯閫?BR>    </div 瀛?gt;
    </div 鏀剁緝>
</div 鐖?gt;

鍏舵 瀵逛簬榪欑騫朵笉鐩存帴鍚湁鐖跺瓙鍏崇郴鐨勮妭鐐歸鍏堣鍒ゆ槑涓涓妭鐐圭殑瀛?鍜?鍏勫紵錛岀劧鍚庣敤閫掑綊瑙e喅銆?BR>閫掑綊鐨勬濊礬濡備笅娣卞害浼樺厛錛?BR>function toHtml(鑺傜偣index)
{
   var child_html錛?BR>   if 榪欎釜鑺傜偣鏈夊瓙
   {
        Loop瀛愯妭鐐?BR>        {
               child_html[i] = toHtml(瀛愯妭鐐筰ndex)錛?BR>               i++錛涜闂笅涓涓瓙鑺傜偣
   }
  
   var 鎵鏈夊瓙鑺傜偣Html妯″潡 = <div 鏀剁緝>   child_html.join("") </div>

   var 鏈妭鐐笻tml妯″潡 = <div 鏈妭鐐?gt;<div 鏀剁緝><img ><img  鍥炬爣 /><a 鑺傜偣鍔ㄤ綔>鑺傜偣Label</a>鎵鏈夊瓙鑺傜偣Html妯″潡</div 鏀剁緝></div 鏈妭鐐?gt;;

   return  鏈妭鐐笻tml妯″潡;
}

鏍?wèi)灏辨瀯寰忓ソ浜嗐?BR>
浣滀負(fù)鏄劇ず錛屼嬌鐢ㄤ簡CSS鐨?BR>background-repeat: repeat-y;
 background-image: url("../images/tree/I.png") !important;
 background-position-y: 1px !important; /* IE only */

榪樻湁padding-left浣淒iv鐨勫悜鍙沖亸縐伙紝榛樿鐨勫亸縐婚噺鏄?9涓儚绱犵偣錛岀劧鍚庢牴鎹甌ree鏄劇ず妯″瀷鐨刬ndent鐩鎬箻灝眔k浜嗐?BR>
鎬濊礬灝辨槸榪欎簺銆傚笇鏈涜兘瀵?鏈嬪弸浠湁鎵甯姪銆?BR>嬈㈣繋璁ㄨ銆?BR>

-=Kino=- 2006-01-27 16:42 鍙戣〃璇勮
]]>
C#涓嶫ava錛堜竴錛?/title><link>http://m.tkk7.com/kinoviti/archive/2005/11/11/19257.html</link><dc:creator>-=Kino=-</dc:creator><author>-=Kino=-</author><pubDate>Fri, 11 Nov 2005 02:27:00 GMT</pubDate><guid>http://m.tkk7.com/kinoviti/archive/2005/11/11/19257.html</guid><wfw:comment>http://m.tkk7.com/kinoviti/comments/19257.html</wfw:comment><comments>http://m.tkk7.com/kinoviti/archive/2005/11/11/19257.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://m.tkk7.com/kinoviti/comments/commentRss/19257.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/kinoviti/services/trackbacks/19257.html</trackback:ping><description><![CDATA[<P align=left><FONT size=6><STRONG>C#涓嶫ava錛堜竴錛?/STRONG></FONT><BR><BR><BR>************************************************<BR>鍏抽敭瀛楋細(xì)緇ф壙<BR>闅炬槗搴︼細(xì)鏄?IMG height=20 src="http://m.tkk7.com/Emoticons/QQ/14.gif" width=20 border=0><BR>************************************************<BR><BR><BR>鏈榪戝洜涓哄伐浣滈渶瑕佸紑灞曞熀浜嶤#鐨勭爺鍙戙傛垜鍦ㄨ繖閲屼篃灝卞啓涓鐐逛綔涓篔ava紼嬪簭鍛樺浜嶤#鐨勯儴鍒嗘劅鎯沖惂銆傛瘯绔熻兘鍔涙湁闄愶紝璇峰悇浣嶉珮鎵嬪澶氱偣鎷ㄣ?BR><BR>1.1瀹炵幇鐨勭戶鎵?BR><BR>C#鍜孞ava涓鏍蜂笉鑳界戶鎵縫rivate銆備絾鏄疌++鍙互鍦ㄧ戶鎵夸腑鏄庣‘鎸囧嚭瑕佺戶鎵垮叡鏈夌殑榪樻槸縐佹湁鐨勩傚涓嬶細(xì)<BR><BR>榪欎釜鏄疌#鐨勭戶鎵夸功鍐欐柟娉曪紝浣滀負(fù)鍩虹被鐨凜SharpBaseClass騫舵病鏈夐檺瀹氱銆?/P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> CSharpClass 錛欳SharpBaseClass<BR></SPAN><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_35_45_Open_Image onclick="this.style.display='none'; Codehighlighter1_35_45_Open_Text.style.display='none'; Codehighlighter1_35_45_Closed_Image.style.display='inline'; Codehighlighter1_35_45_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_35_45_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_35_45_Closed_Text.style.display='none'; Codehighlighter1_35_45_Open_Image.style.display='inline'; Codehighlighter1_35_45_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_35_45_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_35_45_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>   </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">鎴愬憳</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">4</SPAN><SPAN style="COLOR: #008000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN></DIV> <P>榪欎釜鏄疛ava浜嗭紝鐔熸?zhèn)夊惂銆?/P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> Class JavaClass </SPAN><SPAN style="COLOR: #0000ff">extends</SPAN><SPAN style="COLOR: #000000"> JavaBaseClass<BR><IMG id=Codehighlighter1_45_54_Open_Image onclick="this.style.display='none'; Codehighlighter1_45_54_Open_Text.style.display='none'; Codehighlighter1_45_54_Closed_Image.style.display='inline'; Codehighlighter1_45_54_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_45_54_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_45_54_Closed_Text.style.display='none'; Codehighlighter1_45_54_Open_Image.style.display='inline'; Codehighlighter1_45_54_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_45_54_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_45_54_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">鎴愬憳</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN></DIV> <P>C++鐨勫畾涔夊涓嬶細(xì)</P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> CPlusPlusClass: </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> CPlusPlusBaseClass<BR><IMG id=Codehighlighter1_48_58_Open_Image onclick="this.style.display='none'; Codehighlighter1_48_58_Open_Text.style.display='none'; Codehighlighter1_48_58_Closed_Image.style.display='inline'; Codehighlighter1_48_58_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_48_58_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_48_58_Closed_Text.style.display='none'; Codehighlighter1_48_58_Open_Image.style.display='inline'; Codehighlighter1_48_58_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_48_58_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_48_58_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>   </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">鎴愬憳</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN></DIV> <P>1.2铏氬嚱鏁?BR><BR>鎶婁竴涓熀綾誨嚱鏁板0鏄庝負(fù)virtual錛岃鍑芥暟灝卞彲浠ュ湪浠諱綍媧劇敓綾諱腑閲嶅啓浜嗐?BR>Java鐨勮娉曚腑娌℃湁virtual榪欎釜璇嶏紝浣嗘槸Java鍗村交褰誨簳搴曠殑璐交鐫榪欎釜姒傚康錛孞ava鐨勬墍鏈夊嚱鏁伴兘鏄櫄鎷熺殑銆?BR>C++鐨勬湅鍙嬪彲鑳芥瘮杈冪啛鎮(zhèn)夎繖涓瘝鍚с傚浜庤繖涓鐐笴#鍜孋++鏄浉鍚岀殑銆備絾鏄娉曠◢寰湁鐐逛笉鍚岋紝C#闇瑕佷嬌鐢╫verride綾繪樉紺哄0鏄庨噸鍐欏嚱鏁般傚涓嬩緥<BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> BaseClass<BR><IMG id=Codehighlighter1_16_158_Open_Image onclick="this.style.display='none'; Codehighlighter1_16_158_Open_Text.style.display='none'; Codehighlighter1_16_158_Closed_Image.style.display='inline'; Codehighlighter1_16_158_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_16_158_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_16_158_Closed_Text.style.display='none'; Codehighlighter1_16_158_Open_Image.style.display='inline'; Codehighlighter1_16_158_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_16_158_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_16_158_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>         </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">virtual</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> VirtualMethod()<BR><IMG id=Codehighlighter1_73_156_Open_Image onclick="this.style.display='none'; Codehighlighter1_73_156_Open_Text.style.display='none'; Codehighlighter1_73_156_Closed_Image.style.display='inline'; Codehighlighter1_73_156_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_73_156_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_73_156_Closed_Text.style.display='none'; Codehighlighter1_73_156_Open_Image.style.display='inline'; Codehighlighter1_73_156_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN id=Codehighlighter1_73_156_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_73_156_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>                   </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">The virtual method in defined in Base class</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> ChildClass : BaseClass<BR><IMG id=Codehighlighter1_190_338_Open_Image onclick="this.style.display='none'; Codehighlighter1_190_338_Open_Text.style.display='none'; Codehighlighter1_190_338_Closed_Image.style.display='inline'; Codehighlighter1_190_338_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_190_338_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_190_338_Closed_Text.style.display='none'; Codehighlighter1_190_338_Open_Image.style.display='inline'; Codehighlighter1_190_338_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_190_338_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_190_338_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">override</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> VirtualMethod()<BR><IMG id=Codehighlighter1_251_336_Open_Image onclick="this.style.display='none'; Codehighlighter1_251_336_Open_Text.style.display='none'; Codehighlighter1_251_336_Closed_Image.style.display='inline'; Codehighlighter1_251_336_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_251_336_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_251_336_Closed_Text.style.display='none'; Codehighlighter1_251_336_Open_Image.style.display='inline'; Codehighlighter1_251_336_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN id=Codehighlighter1_251_336_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_251_336_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>                   </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">The override method in defined in child class</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV> <P><BR><BR>1.3闅愯棌鏂規(guī)硶<BR>鐩稿悓絳懼悕鐨勬柟娉曞湪鍩虹被鍜屽瓙綾婚兘澹版槑浜嗭紝浣嗘柟娉曚笉鏄痸itrual銆傞偅涔堝疄闄呬腑鍒板簳鍝釜鏂規(guī)硶琚墽琛岋紝鍙栧喅浜庡紩鐢ㄥ疄渚嬬殑鍙橀噺綾誨瀷錛岃屼笉鏄疄鍔涙湰韜殑綾誨瀷銆?BR>鎴戜滑涔熶笉鐢ㄥお鎷呭績榪欎釜闂錛屽洜涓篊#浼?xì)鍦ň~栬瘧鏈熺粰鍑鴻鍛娿?BR><BR>1.4璋冪敤縐瘡鍑芥暟鐨勬柟娉?BR>java涓垜浠嬌鐢╯uper錛孋#涓嬌鐢╞ase銆?BR><BR>1.5鎶借薄綾誨拰鎶借薄鍑芥暟<BR>鍜宩ava涓鏍蜂嬌鐢╝bstract澹版槑銆?BR>鍜孋++鐩告瘮錛孋++鐨勬娊璞″嚱鏁拌澹版槑涓虹函铏氬嚱鏁般?BR><BR>1.6瀵嗗皝綾誨拰瀵嗗皝鏂規(guī)硶<BR>鍦↗ava涓垜浠妸瀹冨彨鍋歠inal銆備篃灝辨槸涓嶈兘緇ф壙鐨勭被鎴栦笉鑳介噸杞界殑鏂規(guī)硶銆?/P> <P>1.7鏋勯犲嚱鏁扮殑璋冪敤灞傛<BR>鍜孞ava涓鏍鳳紝鎴戝氨涓嶅璇翠簡銆傝繖閲屽己璋冧竴涓壒孌婄殑璇硶鏍煎紡錛?BR><BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> BaseClass<BR><IMG id=Codehighlighter1_23_280_Open_Image onclick="this.style.display='none'; Codehighlighter1_23_280_Open_Text.style.display='none'; Codehighlighter1_23_280_Closed_Image.style.display='inline'; Codehighlighter1_23_280_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_23_280_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_23_280_Closed_Text.style.display='none'; Codehighlighter1_23_280_Open_Image.style.display='inline'; Codehighlighter1_23_280_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_23_280_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_23_280_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> temp </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Default Construct</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> _flag<BR><IMG id=Codehighlighter1_88_141_Open_Image onclick="this.style.display='none'; Codehighlighter1_88_141_Open_Text.style.display='none'; Codehighlighter1_88_141_Closed_Image.style.display='inline'; Codehighlighter1_88_141_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_88_141_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_88_141_Closed_Text.style.display='none'; Codehighlighter1_88_141_Open_Image.style.display='inline'; Codehighlighter1_88_141_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>  </SPAN><SPAN id=Codehighlighter1_88_141_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_88_141_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_98_112_Open_Image onclick="this.style.display='none'; Codehighlighter1_98_112_Open_Text.style.display='none'; Codehighlighter1_98_112_Closed_Image.style.display='inline'; Codehighlighter1_98_112_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_98_112_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_98_112_Closed_Text.style.display='none'; Codehighlighter1_98_112_Open_Image.style.display='inline'; Codehighlighter1_98_112_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>     </SPAN><SPAN style="COLOR: #0000ff">get</SPAN><SPAN id=Codehighlighter1_98_112_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_98_112_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> temp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_122_137_Open_Image onclick="this.style.display='none'; Codehighlighter1_122_137_Open_Text.style.display='none'; Codehighlighter1_122_137_Closed_Image.style.display='inline'; Codehighlighter1_122_137_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_122_137_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_122_137_Closed_Text.style.display='none'; Codehighlighter1_122_137_Open_Image.style.display='inline'; Codehighlighter1_122_137_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>     </SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN id=Codehighlighter1_122_137_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_122_137_Open_Text><SPAN style="COLOR: #000000">{ temp </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> value;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">Constructor with one Parameter</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">  </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> BaseClass(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> f)<BR><IMG id=Codehighlighter1_258_278_Open_Image onclick="this.style.display='none'; Codehighlighter1_258_278_Open_Text.style.display='none'; Codehighlighter1_258_278_Closed_Image.style.display='inline'; Codehighlighter1_258_278_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_258_278_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_258_278_Closed_Text.style.display='none'; Codehighlighter1_258_278_Open_Image.style.display='inline'; Codehighlighter1_258_278_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>  </SPAN><SPAN id=Codehighlighter1_258_278_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_258_278_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      flag </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> f;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> ChildClass : BaseClass<BR><IMG id=Codehighlighter1_319_1043_Open_Image onclick="this.style.display='none'; Codehighlighter1_319_1043_Open_Text.style.display='none'; Codehighlighter1_319_1043_Closed_Image.style.display='inline'; Codehighlighter1_319_1043_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_319_1043_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_319_1043_Closed_Text.style.display='none'; Codehighlighter1_319_1043_Open_Image.style.display='inline'; Codehighlighter1_319_1043_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_319_1043_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_319_1043_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_372_373_Open_Image onclick="this.style.display='none'; Codehighlighter1_372_373_Open_Text.style.display='none'; Codehighlighter1_372_373_Closed_Image.style.display='inline'; Codehighlighter1_372_373_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_372_373_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_372_373_Closed_Text.style.display='none'; Codehighlighter1_372_373_Open_Image.style.display='inline'; Codehighlighter1_372_373_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> ChildClass():</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Customized Construct</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_372_373_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_372_373_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_428_429_Open_Image onclick="this.style.display='none'; Codehighlighter1_428_429_Open_Text.style.display='none'; Codehighlighter1_428_429_Closed_Image.style.display='inline'; Codehighlighter1_428_429_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_428_429_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_428_429_Closed_Text.style.display='none'; Codehighlighter1_428_429_Open_Image.style.display='inline'; Codehighlighter1_428_429_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> f):</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara = 1:1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_428_429_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_428_429_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_493_494_Open_Image onclick="this.style.display='none'; Codehighlighter1_493_494_Open_Text.style.display='none'; Codehighlighter1_493_494_Closed_Image.style.display='inline'; Codehighlighter1_493_494_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_493_494_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_493_494_Closed_Text.style.display='none'; Codehighlighter1_493_494_Open_Image.style.display='inline'; Codehighlighter1_493_494_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> f,</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> g):</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara = 1:2</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_493_494_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_493_494_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>   </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> showConstructFlag()<BR><IMG id=Codehighlighter1_543_966_Open_Image onclick="this.style.display='none'; Codehighlighter1_543_966_Open_Text.style.display='none'; Codehighlighter1_543_966_Closed_Image.style.display='inline'; Codehighlighter1_543_966_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_543_966_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_543_966_Closed_Text.style.display='none'; Codehighlighter1_543_966_Open_Image.style.display='inline'; Codehighlighter1_543_966_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </SPAN><SPAN id=Codehighlighter1_543_966_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_543_966_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Second();<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      Console.WriteLine(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Show ConstructFlag:\n ChildClass():base(\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Customized Construct\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">_Flag);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Second(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      Console.WriteLine(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Show ConstructFlag:\n Second(string f,string g):base(\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">:</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">_Flag);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Second(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test2</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">no use</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      Console.WriteLine(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Show ConstructFlag:\n Second(string f,string g):base(\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">:</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">_Flag);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>   <BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> Main()<BR><IMG id=Codehighlighter1_1006_1041_Open_Image onclick="this.style.display='none'; Codehighlighter1_1006_1041_Open_Text.style.display='none'; Codehighlighter1_1006_1041_Closed_Image.style.display='inline'; Codehighlighter1_1006_1041_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1006_1041_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1006_1041_Closed_Text.style.display='none'; Codehighlighter1_1006_1041_Open_Image.style.display='inline'; Codehighlighter1_1006_1041_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1006_1041_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1006_1041_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        showConstructFlag();<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV> <P>緇撴灉濡傞璁¢偅鏍?錛?BR>濡傛灉鍩虹被鍚湁甯﹀弬鏁扮殑鏋勯犲嚱鏁幫紝媧劇敓綾諱笉鑳借皟鐢ㄩ粯璁ゅ熀綾繪瀯閫犲嚱鏁般?BR>澶氬弬鏁版淳鐢熺被鏋勯犲嚱鏁幫紝鍙互璋冪敤鍙傛暟鏁扮洰涓嶅悓鐨勫熀綾繪瀯閫犲嚱鏁般?BR><BR>鎴戜滑涓璧鋒潵鐪嬬湅涓轟粈涔堣繖2涓粨璁哄彲浠ユ垚绔嬶細(xì)<BR>棣栧厛錛屽浜庡甫鍙傛暟鐨勫熀綾繪瀯閫犲嚱鏁板湪鍒濆鍖栫殑鏃跺欎細(xì)璇曞浘鍘昏皟鐢ㄥ熀綾婚粯璁ゆ瀯閫犲嚱鏁幫紝浣嗗湪涓婅竟鐨勫熀綾葷▼搴忛噷錛屽洜涓哄彧澹版槑浜嗗甫涓涓弬鏁扮殑鏋勯犲嚱鏁幫紝鎵浠ublic Second(string f):base()鎴栬卲ublic Second(string f)灝變笉浼?xì)閫氳繃緙栬瘧錛屽洜涓轟粬鎵句笉鍒板熀綾葷殑榛樿鏋勯犲嚱鏁幫紝鍙兘榪藉姞<SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> BaseClass(</SPAN><SPAN style="COLOR: #000000">)鎵嶄細(xì)閫氳繃銆傝繖涓鐐瑰拰JAVA鏄笉鍚岀殑錛宩ava鐨勯粯璁ゆ瀯閫犲嚱鏁伴粯璁ゆ槸涓嶅嚭鐜板湪浠g爜閲岀殑銆侰#鍗翠竴瀹氳鍐欏嚭鏉ャ?BR><BR><<<== <FONT color=#ff0000>鏈夐敊璇侰#鐨勯粯璁ゆ瀯閫犲嚱鏁頒綋鍒跺拰Java鏄竴鏍風(fēng)殑銆傚叿浣撳涓嬶細(xì)<BR>1銆傜埗綾繪病鏈夎嚜瀹氫箟鏋勯犲嚱鏁扮殑鎯呭喌涓嬶紝浣跨敤榛樿鏋勯犲嚱鏁般傜敤鎴峰彲浠ヤ笉鍐欏嚭鏉ャ?BR>2銆備竴鏃︾埗綾繪湁浜嗚嚜瀹氫箟鐨勬瀯閫犲嚱鏁幫紝閭d箞濡傛灉瑕佷嬌鐢ㄦ棤鍙傜殑榛樿鏋勯犲嚱鏁板氨蹇呴』瑕佹樉紺哄畾涔夈?/FONT><BR><BR><BR><BR><BR>鍏舵錛屼笅杈規(guī)淳鐢熺被1涓弬鏁般?涓弬鏁扮敋鑷沖涓弬鏁扮殑鏋勯犲嚱鏁頒負(fù)浠涔堣兘璁塊棶鍙湁涓涓弬鏁扮殑鍩虹被鏋勯犲嚱鏁板憿錛熷師鍥犳槸錛屽叧閿瓧this錛屼笂杈圭殑紼嬪簭鏀瑰啓濡備笅鎴戞兂澶у灝辨槑鐧戒簡銆?BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG id=Codehighlighter1_49_50_Open_Image onclick="this.style.display='none'; Codehighlighter1_49_50_Open_Text.style.display='none'; Codehighlighter1_49_50_Closed_Image.style.display='inline'; Codehighlighter1_49_50_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_49_50_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_49_50_Closed_Text.style.display='none'; Codehighlighter1_49_50_Open_Image.style.display='inline'; Codehighlighter1_49_50_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> f):</SPAN><SPAN style="COLOR: #0000ff">base</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">BPara:CPara = 1:1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_49_50_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_49_50_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_108_109_Open_Image onclick="this.style.display='none'; Codehighlighter1_108_109_Open_Text.style.display='none'; Codehighlighter1_108_109_Closed_Image.style.display='inline'; Codehighlighter1_108_109_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_108_109_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_108_109_Closed_Text.style.display='none'; Codehighlighter1_108_109_Open_Image.style.display='inline'; Codehighlighter1_108_109_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> Second(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> f,</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> g):</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> f,</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><None</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_108_109_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_108_109_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN></DIV> <P dir=ltr style="MARGIN-RIGHT: 0px"></SPAN>2.1淇グ絎?BR>C#鏀寔涓嬭竟鐨勯泦涓慨楗扮錛?BR>public 錛?nbsp;  protected 錛?internal  錛宲rivate 錛?protected internal<BR>鍚孞ava銆俰nternal鍜宲rotected internal鏄?net framework鏂板鐨勪竴涓唴瀹廣傛牴鎹畾涔夈?BR>internal鍦ㄥ悓涓涓▼搴忛泦鍐呭拰public綾諱技錛屼笉鍚岀殑紼嬪簭闆嗛棿錛宲ublic澹版槑鐨勭被鎴栨柟娉曚粛鐒跺彲鐢紝浣嗘槸internal鐨勬柟娉曟垨綾誨垯琚殣钘忋?BR>protected internal鍚堝茍浜唒rotected 鍜宨nternal錛屼絾榪欐槸涓縐峯r鍏崇郴錛岃屼笉鏄痑nd鍏崇郴銆俻rotected internal鎴愬憳鍦ㄥ悓涓涓▼搴忛泦鐨勪換浣曚唬鐮侀兘鍙錛屽湪媧劇敓綾誨彲瑙併?BR><BR>2.3鎺ュ彛<BR>鎺ュ彛鍏害錛?BR>涓嶈兘瀹炰緥鍖栨帴鍙c?BR>鎺ュ彛涓嶈兘鏈夋瀯閫犲嚱鏁版垨瀛楁銆?BR>鎺ュ彛瀹氫箟涔熶笉鍏佽鍖呭惈榪愮畻絎﹂噸杞姐?BR>鎺ュ彛瀹氫箟涓繕涓嶅厑璁稿0鏄庢垚鍛樹笂鐨勪慨楗扮銆傛帴鍙f垚鍛橀兘鏄痯ublic鐨勶紝涓嶉渶瑕乻tatic涔熶笉闇瑕乿irtual銆?BR><BR>鍚孞ava<BR>鎺ュ彛鍙互褰兼緇ф壙錛屽叾鏂瑰紡鍜岀被緇ф壙鐩稿悓銆傚涓嬶細(xì)<BR><BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000"> my.test<BR><IMG id=Codehighlighter1_18_154_Open_Image onclick="this.style.display='none'; Codehighlighter1_18_154_Open_Text.style.display='none'; Codehighlighter1_18_154_Closed_Image.style.display='inline'; Codehighlighter1_18_154_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_18_154_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_18_154_Closed_Text.style.display='none'; Codehighlighter1_18_154_Open_Image.style.display='inline'; Codehighlighter1_18_154_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_18_154_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_18_154_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">interface</SPAN><SPAN style="COLOR: #000000"> IBase<BR><IMG id=Codehighlighter1_47_152_Open_Image onclick="this.style.display='none'; Codehighlighter1_47_152_Open_Text.style.display='none'; Codehighlighter1_47_152_Closed_Image.style.display='inline'; Codehighlighter1_47_152_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_47_152_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_47_152_Closed_Text.style.display='none'; Codehighlighter1_47_152_Open_Image.style.display='inline'; Codehighlighter1_47_152_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>  </SPAN><SPAN id=Codehighlighter1_47_152_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_47_152_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> setName();<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> isMe(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> name);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> name<BR><IMG id=Codehighlighter1_125_147_Open_Image onclick="this.style.display='none'; Codehighlighter1_125_147_Open_Text.style.display='none'; Codehighlighter1_125_147_Closed_Image.style.display='inline'; Codehighlighter1_125_147_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_125_147_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_125_147_Closed_Text.style.display='none'; Codehighlighter1_125_147_Open_Image.style.display='inline'; Codehighlighter1_125_147_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>      </SPAN><SPAN id=Codehighlighter1_125_147_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_125_147_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>         </SPAN><SPAN style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>      }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>   }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000"> my.test<BR><IMG id=Codehighlighter1_175_243_Open_Image onclick="this.style.display='none'; Codehighlighter1_175_243_Open_Text.style.display='none'; Codehighlighter1_175_243_Closed_Image.style.display='inline'; Codehighlighter1_175_243_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_175_243_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_175_243_Closed_Text.style.display='none'; Codehighlighter1_175_243_Open_Image.style.display='inline'; Codehighlighter1_175_243_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_175_243_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_175_243_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">interface</SPAN><SPAN style="COLOR: #000000"> IChild:IBase<BR><IMG id=Codehighlighter1_215_241_Open_Image onclick="this.style.display='none'; Codehighlighter1_215_241_Open_Text.style.display='none'; Codehighlighter1_215_241_Closed_Image.style.display='inline'; Codehighlighter1_215_241_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_215_241_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_215_241_Closed_Text.style.display='none'; Codehighlighter1_215_241_Open_Image.style.display='inline'; Codehighlighter1_215_241_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_215_241_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_215_241_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>       </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> isOK();<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV> <P dir=ltr style="MARGIN-RIGHT: 0px">鍛婁竴孌佃惤鍚с?nbsp;                                (銇ゃ仴銇?<BR><IMG height=20 src="http://m.tkk7.com/Emoticons/QQ/laf.gif" width=20 border=0>璇峰鎻愭剰瑙侊紝濡傛灉鏈変粈涔堜笉娓呮鐨勫湴鏂逛篃璇蜂綘鍐欎笅鏉ワ紝涓璧瘋皟鏌ュ挴銆?nbsp; <IMG height=20 src="http://m.tkk7.com/Emoticons/QQ/laf.gif" width=20 border=0></P><img src ="http://m.tkk7.com/kinoviti/aggbug/19257.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/kinoviti/" target="_blank">-=Kino=-</a> 2005-11-11 10:27 <a href="http://m.tkk7.com/kinoviti/archive/2005/11/11/19257.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Struts Logic鏍囩搴?/title><link>http://m.tkk7.com/kinoviti/archive/2005/10/13/15446.html</link><dc:creator>-=Kino=-</dc:creator><author>-=Kino=-</author><pubDate>Thu, 13 Oct 2005 12:04:00 GMT</pubDate><guid>http://m.tkk7.com/kinoviti/archive/2005/10/13/15446.html</guid><wfw:comment>http://m.tkk7.com/kinoviti/comments/15446.html</wfw:comment><comments>http://m.tkk7.com/kinoviti/archive/2005/10/13/15446.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/kinoviti/comments/commentRss/15446.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/kinoviti/services/trackbacks/15446.html</trackback:ping><description><![CDATA[<P><BR><IMG height=20 src="http://m.tkk7.com/Emoticons/QQ/blink.gif" width=20 border=0>Struts Logic鏍囩搴?IMG height=20 src="http://m.tkk7.com/Emoticons/QQ/blink.gif" width=20 border=0> <BR><BR>Keywords: Struts   Logic  鏍囩  JSP<BR>闅懼害錛氭槗<BR><BR>鑳屾櫙錛氫笉鐭ラ亾鏄笉鏄浉搴斺滀笌鏃朵勘榪涒濈殑澶у彿鍙傚弽姝e綋浠婄殑JSP鏄秺鏉ヨ秺闅炬噦浜嗐備笉鏄楹葷儲(chǔ)錛岃屾槸鍥犱負(fù)澶畝鍗曚簡錛屽弽鑰屼笉鎳備簡銆傞兘鏄洜涓哄紩鍏ヤ簡 鏍囩搴撱?榪欎笅濂戒簡錛岄櫎浜嗗熀紜HTML,JSP璇硶澶栬繕瑕佸寰堝鏍囩搴撶殑鐢ㄦ硶銆傚姞娌瑰惂銆?BR><BR>姒傚康錛?BR>Struts Logic鏍囩搴撲腑鐨勬爣絳懼彲浠ユ牴鎹壒瀹氱殑閫昏緫鏉′歡鏉ユ帶鍒惰緭鍑虹綉欏電殑鍐呭錛屾垨鑰呭驚鐜亶鍘嗛泦鍚堜腑鐨勬墍鏈夊厓绱犮備富瑕佺敤浜庤〃紺哄眰鐨勬樉紺恒?BR>Logic鏍囩搴撶殑鏍囩澶ц嚧鍒嗕負(fù)浠ヤ笅鍑犵被錛?BR><BR><BR>...娌℃湁鏃墮棿鍐欎簡銆傛垜鍊掞紝浜夊彇11鏈堜箣鍓嶅啓瀹屻?BR></P><img src ="http://m.tkk7.com/kinoviti/aggbug/15446.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/kinoviti/" target="_blank">-=Kino=-</a> 2005-10-13 20:04 <a href="http://m.tkk7.com/kinoviti/archive/2005/10/13/15446.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Java 寮傚父澶勭悊http://m.tkk7.com/kinoviti/archive/2005/10/13/15420.html-=Kino=--=Kino=-Thu, 13 Oct 2005 06:15:00 GMThttp://m.tkk7.com/kinoviti/archive/2005/10/13/15420.htmlhttp://m.tkk7.com/kinoviti/comments/15420.htmlhttp://m.tkk7.com/kinoviti/archive/2005/10/13/15420.html#Feedback0http://m.tkk7.com/kinoviti/comments/commentRss/15420.htmlhttp://m.tkk7.com/kinoviti/services/trackbacks/15420.html
Java寮傚父澶勭悊鏈哄埗


keywords:

Exception,Method Inovation Stack,

闅懼害錛氬垵瀛︼紝鏄?/FONT>


寮傚父綾葷殑緇ф壙
Java寮傚父鏄痡ava紼嬪簭榪愯鏃墮亣鍒伴潪姝e父鎯呭喌鑰屽垱寤虹殑涓縐嶅璞★紝濂瑰寘瑁呬簡寮傚父鐨勪俊鎭?BR>Java寮傚父鐨勯《綰х被灝辨槸java.lang.Throwable銆傚叾緇撴瀯濡備笅錛?BR>
JavaExceptionClass
鍏朵腑

Error ---- JVM鐨勯敊璇紝涔熷氨鏄▼搴忔湰韜棤娉曟仮澶嶇殑涓ラ噸閿欒銆?BR>
Exception--琚▼搴忔崟鑾峰茍澶勭悊鐨勫紓甯搞?BR>


JVM鐨勬柟娉曡皟鐢ㄥ爢鏍?/STRONG>
澶у瀵逛簬Debug閮藉緢鍠滄錛屽洜涓烘瘡褰撴湁寮傚父鍑虹幇鐨勬椂鍊欙紝濂逛細(xì)鍛婅瘔浣犲摢閲屽嚭浜嗗紓甯歌皟鐢ㄥ埌搴曟槸浠涔堛傝繖鍙堟槸濡備綍瀹炵幇鐨勶紵

鍦↗VM涓嬌鐢ㄤ簡Method Inovation Stack鏈哄埗鏉ヨ窡韙瘡涓涓嚎紼嬩腑涓緋誨垪鐨勬柟娉曡皟鐢ㄨ繃紼嬨傚茍淇濆瓨鍦⊿tack閲岃竟銆?BR>Stack鐨勯《绔篃灝辨槸褰撳墠姝e湪澶勭悊鐨勬柟娉曘傚湪Debug鐨勬椂鍊欙紝JVM浼?xì)鏆傚仠琚玠ebug鐨勭嚎紼嬶紝鍏嬮殕濂圭殑Stack錛岀劧鍚庢樉紺哄嚭鏉ヤ緵

developer鎿嶄綔錛岃繖涓鐐圭敤Eclipse鐨勪漢寰堟湁浣撻獙鍚с?BR>


涓鏃﹀紓甯稿彂鐢燂紝JVM棣栧厛浠庡綋鍓嶇殑鏂規(guī)硶寮濮嬪鎵懼鐞嗙殑try/Catch錛屾壘涓嶅埌錛屽氨鍥炴湐鍒皊tack鐨勪笅涓涓紝涔熷氨鏄痯arent璋冪敤

鏂規(guī)硶銆備婦渚嬪涓嬶細(xì)

public void child(int a)throws UserException{
  
if (a < 0
     
throw new UserException();
}


鐖舵柟娉曞涓嬶細(xì)

public void parent(int a){
  
try{
      a 
= 1;
      method(a);
//throw Exception
  }
catch(UserException ue){
      System.out.println(
"I get it from Child")!
      ue.printExceptionStack();
  }

}


灝辮繖鏍鳳紝寮傚父琚姄浣忎簡銆傚綋鐒?dòng)灱屽鏋滃湪child鏂規(guī)硶閲岃竟灝辨崟鑾鳳紝parent灝變笉鐢ㄨ繖涔堚滅瘡鈥濅簡銆?BR>
鍏跺疄鏈绱殑榪樻槸JVM錛屽ス瑕佸寮傚父鎹曡幏榪涜鏌ユ壘錛屽鏋滀竴鐩撮兘鎵句笉鍒幫紝灝辨妸寮傚父鐩存帴鎶涚粰鐢ㄦ埛錛岄偅涔堝湪緇堢涓婂氨鑳界湅

鍒頒簡銆傚鏋滄槸鎶涘嚭寮傚父鐨勭▼搴忔槸涓葷▼錛岃繕娌℃湁琚崟鑾鳳紝閭e氨鈥滄緲樼繕鈥濅簡銆傝娉ㄦ剰錛?BR>


寮傚父澶勭悊瀵規(guī)ц兘鐨勫獎(jiǎng)鍝?/STRONG>

浠庝笂杈圭殑鍘熺悊灝辮兘鐭ラ亾錛屼笉鎹曟崏寮傚父銆佹崟鎹夊紓甯哥殑浣嶇疆涓嶅悎閫傘侀兘浼?xì)瀵艰嚧JVM鎬ц兘闄嶄綆銆?BR>


(PS:鍏堣鍒拌繖閲岋紝緇х畫涓婄彮銆?











-=Kino=- 2005-10-13 14:15 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲偷自拍另类图片二区| 亚洲乱码日产一区三区| 亚洲沟沟美女亚洲沟沟| 青青草无码免费一二三区| 国产亚洲精品xxx| 国产成人无码区免费网站| 久久久久久a亚洲欧洲aⅴ| 久久99毛片免费观看不卡| 亚洲v高清理论电影| 97国产免费全部免费观看| 亚洲一区在线免费观看| 在线免费一区二区| 鲁死你资源站亚洲av| 四虎精品亚洲一区二区三区| 国产天堂亚洲精品| 亚洲乱码中文字幕久久孕妇黑人| 国产精品免费大片一区二区| 亚洲国产AV无码专区亚洲AV | 久久亚洲AV成人出白浆无码国产| 久久免费福利视频| 激情综合亚洲色婷婷五月APP| 日本视频免费在线| 国产午夜无码片免费| 亚洲理论片在线中文字幕| 日本高清免费网站| 91成人免费福利网站在线| 亚洲高清资源在线观看| 曰批全过程免费视频免费看| 亚洲午夜国产精品无码 | 特级做A爰片毛片免费看无码| 亚洲a在线视频视频| a毛片基地免费全部视频| 日本一区二区在线免费观看| 亚洲国产精华液网站w| 免费精品国产自产拍在| 极品美女一级毛片免费| 色婷婷亚洲十月十月色天| 尤物永久免费AV无码网站| 热99RE久久精品这里都是精品免费| 亚洲一区二区三区精品视频| 亚洲色偷拍区另类无码专区|