锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美风情在线视频,日韩一区二区在线播放,仙踪林久久久久久久999http://www.aygfsteel.com/yesjoy/category/7343.html<font color="red">鈽?lt;/font><font color="blue">鎬誨湪鐖北 鎵浠ヨ壈杈?鎬誨湪瀵繪ⅵ 鎵浠ヨ嫤鐥?lt;/font><font color="red">鈽?lt;/font>zh-cnTue, 31 Aug 2010 05:57:26 GMTTue, 31 Aug 2010 05:57:26 GMT60閿欒浠g爜浜?/title><link>http://www.aygfsteel.com/yesjoy/articles/30579.html</link><dc:creator>鈽厃esjoy鈽?/dc:creator><author>鈽厃esjoy鈽?/author><pubDate>Tue, 14 Feb 2006 05:12:00 GMT</pubDate><guid>http://www.aygfsteel.com/yesjoy/articles/30579.html</guid><wfw:comment>http://www.aygfsteel.com/yesjoy/comments/30579.html</wfw:comment><comments>http://www.aygfsteel.com/yesjoy/articles/30579.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/yesjoy/comments/commentRss/30579.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/yesjoy/services/trackbacks/30579.html</trackback:ping><description><![CDATA[1銆佸唴閮ㄧ被閿欒<BR> <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: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> OuterClass1{<BR> </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000"> d1 </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1.0</SPAN><SPAN style="COLOR: #000000">; <BR> </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> InnerOne{<BR>  </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">double</SPAN><SPAN style="COLOR: #000000"> methoda() {</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> d1;}<BR> } <BR>} </SPAN></DIV> <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: #000000">E:\myprogram\mianshi</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">javac OuterClass1.java<BR>OuterClass1.java:</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">: 鏃犳硶浠庨潤鎬佷笂涓嬫枃涓紩鐢ㄩ潪闈欐?nbsp;鍙橀噺 d1<BR>  </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">double</SPAN><SPAN style="COLOR: #000000"> methoda() {</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> d1;}<BR>                                         </SPAN><SPAN style="COLOR: #000000">^</SPAN><SPAN style="COLOR: #000000"><BR>OuterClass1.java:</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">: 鍐呴儴綾諱笉鑳芥湁闈欐佸0鏄?BR>  </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">double</SPAN><SPAN style="COLOR: #000000"> methoda() {</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> d1;}<BR>                       </SPAN><SPAN style="COLOR: #000000">^</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000"> 閿欒</SPAN></DIV>閿欒鎻愮ず錛氶潤鎬佸唴閮ㄧ被鍙互鏈夐潤鎬佹垚鍛橈紝鑰岄潪闈欐佸唴閮ㄧ被鍒欎笉鑳芥湁闈欐佹垚鍛橈紱闈欐佸唴閮ㄧ被鐨勯潪闈欐佹垚鍛樺彲浠ヨ闂閮ㄧ被鐨勯潤鎬佸彉閲忥紝鑰屼笉鍙闂閮ㄧ被鐨勯潪闈欐佸彉閲忋?img src ="http://www.aygfsteel.com/yesjoy/aggbug/30579.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/yesjoy/" target="_blank">鈽厃esjoy鈽?/a> 2006-02-14 13:12 <a href="http://www.aygfsteel.com/yesjoy/articles/30579.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>閿欒浠g爜涓http://www.aygfsteel.com/yesjoy/articles/30090.html鈽厃esjoy鈽?/dc:creator>鈽厃esjoy鈽?/author>Fri, 10 Feb 2006 01:37:00 GMThttp://www.aygfsteel.com/yesjoy/articles/30090.htmlhttp://www.aygfsteel.com/yesjoy/comments/30090.htmlhttp://www.aygfsteel.com/yesjoy/articles/30090.html#Feedback0http://www.aygfsteel.com/yesjoy/comments/commentRss/30090.htmlhttp://www.aygfsteel.com/yesjoy/services/trackbacks/30090.html
abstract class Name {
   
private String name;
   
public abstract boolean isStupidName(String name) {}
}
榪愯閿欒鎻愮ず錛?BR>
C:\Documents and Settings\wangzengwei>javac E:\myprogram\problem\Name.java
E:\myprogram\problem\Name.java:3: 鎶借薄鏂規硶涓嶈兘鏈変富浣?BR>   public abstract boolean isStupidName(String name) {}
                           ^
1 閿欒

C:\Documents and Settings\wangzengwei>javac E:\myprogram\problem\Name.java
E:\myprogram\problem\Name.java:4: 闇瑕?nbsp;';'
}
^
1 閿欒

C:\Documents and Settings\wangzengwei>javac E:\myprogram\problem\Name.java

澶т緺浠紝榪欐湁浣曢敊璇?
絳旀: 閿欍俛bstract method蹇呴』浠ュ垎鍙風粨灝撅紝涓斾笉甯﹁姳鎷彿銆?BR>2.婧愮爜錛?BR>
public class Something {
   
void doSomething () {
       
private String s = "";
       
int l = s.length();
   }
}
榪愯閿欒鎻愮ず錛?BR>
E:\myprogram\problem>javac Something.java
Something.java:
3: 闈炴硶鐨勮〃杈懼紡寮濮?BR>       private String s = "";
       
^
1 閿欒

E:\myprogram\problem
>javac Something.java

鏈夐敊鍚?
絳旀: 閿欍傚眬閮ㄥ彉閲忓墠涓嶈兘鏀劇疆浠諱綍璁塊棶淇グ絎?(private錛宲ublic錛屽拰protected)銆俧inal鍙互鐢ㄦ潵淇グ灞閮ㄥ彉閲?BR>(final濡傚悓abstract鍜宻trictfp錛岄兘鏄潪璁塊棶淇グ絎︼紝strictfp鍙兘淇グclass鍜宮ethod鑰岄潪variable)銆?BR>3.婧愮爜錛?BR>
abstract class Something1 {
   
private abstract String doSomething ();
}
榪愯閿欒鎻愮ず錛?BR>
E:\myprogram\problem>javac Something1.java
Something1.java:
2: 闈炴硶鐨勪慨楗扮緇勫悎錛?/SPAN>abstract 鍜?nbsp;private
   
private abstract String doSomething ();
                           
^
1 閿欒
榪欏ソ鍍忔病浠涔堥敊鍚?
絳旀: 閿欍俛bstract鐨刴ethods涓嶈兘浠rivate淇グ銆俛bstract鐨刴ethods灝辨槸璁╁瓙綾籭mplement(瀹炵幇)鍏蜂綋緇嗚妭鐨勶紝鎬庝箞鍙互鐢╬rivate鎶奱bstract
method灝侀攣璧鋒潵鍛? (鍚岀悊錛宎bstract method鍓嶄笉鑳藉姞final)銆?BR>4.婧愮爜錛?BR>
public class Something2 {
   
public int addOne(final int x) {
       
return ++x;
   }
}
榪愯閿欒鎻愮ず錛?BR>
E:\myprogram\problem>javac Something2.java
Something2.java:
3: 涓嶈兘鎸囧畾鏈緇堝弬鏁?nbsp;x
       
return ++x;
                
^
1 閿欒

榪欎釜姣旇緝鏄庢樉銆?BR>絳旀: 閿欍俰nt x琚慨楗版垚final錛屾剰鍛崇潃x涓嶈兘鍦╝ddOne method涓淇敼銆?BR>5銆佹簮鐮侊細
public class Something3 {
   
public static void main(String[] args) {
       Other o 
= new Other();
       
new Something3().addOne(o);
   }
   
public void addOne(final Other o) {
       o.i
++;
   }
}
class Other {
   
public int i;
}
鍜屼笂闈㈢殑寰堢浉浼鹼紝閮芥槸鍏充簬final鐨勯棶棰橈紝榪欐湁閿欏悧?
絳旀: 姝g‘銆傚湪addOne method涓紝鍙傛暟o琚慨楗版垚final銆傚鏋滃湪addOne method閲屾垜浠慨鏀逛簡o鐨剅eference
(姣斿: o = new Other();)錛岄偅涔堝鍚屼笂渚嬭繖棰樹篃鏄敊鐨勩備絾榪欓噷淇敼鐨勬槸o鐨刴ember vairable
(鎴愬憳鍙橀噺)錛岃宱鐨剅eference騫舵病鏈夋敼鍙樸?BR>6銆佹簮鐮侊細
class Something4 {
    
int i;
    
public static void main(String[] args) {
       Something4 st4 
= new Something4();
       st4.doSomething();       
    }
    
public void doSomething() {
        System.out.println(
"i = " + i);
    }
榪愯緇撴灉濡備笅錛?BR>
E:\myprogram\problem>javac Something4.java

E:\myprogram\problem
>java Something4
= 0

鏈変粈涔堥敊鍛? 鐪嬩笉鍑烘潵鍟娿?BR>絳旀: 姝g‘銆傝緭鍑虹殑鏄?i = 0"銆俰nt i灞炴柤instant variable (瀹炰緥鍙橀噺錛屾垨鍙垚鍛樺彉閲?銆俰nstant variable鏈塪efault value銆俰nt鐨刣efault value鏄?銆?BR>7銆佹簮鐮?BR>
class Something5 {
    
final int i;
    
public void doSomething() {
        System.out.println(
"i = " + i);
    }
}
榪愯閿欒鎻愮ず錛?BR>
E:\myprogram\problem>javac Something5.java
Something5.java:
1: 鍙兘灝氭湭鍒濆鍖栧彉閲?nbsp;i
class Something5 {
^
1 閿欒
鍜屼笂闈竴棰樺彧鏈変竴涓湴鏂逛笉鍚岋紝灝辨槸澶氫簡涓涓猣inal銆傝繖闅鵑亾灝遍敊浜嗗悧?
絳旀: 閿欍俧inal int i鏄釜final鐨刬nstant variable (瀹炰緥鍙橀噺錛屾垨鍙垚鍛樺彉閲?銆俧inal鐨刬nstant variable娌℃湁default value錛屽繀欏誨湪constructor (鏋勯犲櫒)緇撴潫涔嬪墠琚祴浜堜竴涓槑紜殑鍊箋傚彲浠ヤ慨鏀逛負"final int i = 0;"銆?BR>淇敼姝g‘鍚庣殑浠g爜錛?BR>
class Something5 {
    
final int i=0;
    
public static void main(String[] args) {
       Something5 st5 
= new Something5();
       st5.doSomething();       
    }
    
public void doSomething() {
        System.out.println(
"i = " + i);
    }
}
榪愯緇撴灉濡備笅錛?BR>
E:\myprogram\problem>javac Something5.java

E:\myprogram\problem
>java Something5
= 0


]]>
主站蜘蛛池模板: 台东县| 广昌县| 应用必备| 红河县| 子洲县| 石首市| 靖远县| 古丈县| 遂平县| 厦门市| 蕲春县| 桃江县| 洞口县| 墨脱县| 眉山市| 宣汉县| 仙桃市| 泗洪县| 五大连池市| 芦山县| 龙游县| 乡宁县| 棋牌| 云霄县| 新疆| 扎鲁特旗| 南昌市| 买车| 五指山市| 金寨县| 布尔津县| 富顺县| 安国市| 高密市| 洛扎县| 阿勒泰市| 大庆市| 来凤县| 石嘴山市| 江山市| 来安县|