ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品99久久免费观看,国产偷国产偷亚洲清高网站,久久综合九色综合网站http://www.aygfsteel.com/chenchuxin/articles/185289.html沉默奔跑è€?/dc:creator>沉默奔跑è€?/author>Tue, 11 Mar 2008 03:08:00 GMThttp://www.aygfsteel.com/chenchuxin/articles/185289.htmlhttp://www.aygfsteel.com/chenchuxin/comments/185289.htmlhttp://www.aygfsteel.com/chenchuxin/articles/185289.html#Feedback0http://www.aygfsteel.com/chenchuxin/comments/commentRss/185289.htmlhttp://www.aygfsteel.com/chenchuxin/services/trackbacks/185289.html
import java.awt.*;
import java.applet.*;


public class BubbleSort extends Applet
{
Label prompt=new Label("误‚¾“入欲排åºçš„æ•´æ•°æ•°æ?最å¤?0ä¸?: ");
TextField input=new TextField(5);
Button sortbtn=new Button("排åº");
int[] DataArray=new int[10];
int DataInputed=0;
int[][] SortPro=new int[11][10];
public void init()

{
add(prompt);add(input);add(sortbtn);
}

public void paint(Graphics g)
{
for(int i=0;i<SortPro.length;i++)
for(int j=0;j<SortPro[i].length;j++)
g.drawString(Integer.toString(SortPro[i][j]),10+30*j,40+20*i);
}

public boolean action(Event e,Object o)
{

if(e.target==input)
{
DataArray[DataInputed++]=Integer.parseInt(input.getText());

if(DataInputed<10)
{
prompt.setText("已输å…?/span>"+DataInputed+"个数æ®ï¼Œè¯ïL‘ô¾l?/span>");
input.setText("");
}
else

{prompt.setText("已输å…?0个数æ®ï¼Œä¸èƒ½å†è¾“入了");
input.hide();
}
}
if(e.target==sortbtn)

{for(int i=0;i<DataArray.length;i++)
SortPro[0][i]=DataArray[i];
SortProcedure();
repaint();
}
return true;
}

void SortProcedure()
{
int pass,i,temp,exchangeCnt;
for(pass=0;pass<DataArray.length;pass++)

{
exchangeCnt=0;
for(i=0;i<DataArray.length-pass-1;i++)

{ if(DataArray[i]>DataArray[i+1])

{temp=DataArray[i];
DataArray[i]=DataArray[i+1];
DataArray[i+1]=temp;
exchangeCnt++;
}
}
for(i=0;i<DataArray.length;i++)
SortPro[pass+1][i]=DataArray[i];
if(exchangeCnt==0)
return;
}
}
}

]]>- 使用命ä×oè¡Œå‚æ•?/title><link>http://www.aygfsteel.com/chenchuxin/articles/185258.html</link><dc:creator>沉默奔跑è€?/dc:creator><author>沉默奔跑è€?/author><pubDate>Tue, 11 Mar 2008 01:44:00 GMT</pubDate><guid>http://www.aygfsteel.com/chenchuxin/articles/185258.html</guid><wfw:comment>http://www.aygfsteel.com/chenchuxin/comments/185258.html</wfw:comment><comments>http://www.aygfsteel.com/chenchuxin/articles/185258.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/chenchuxin/comments/commentRss/185258.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/chenchuxin/services/trackbacks/185258.html</trackback:ping><description><![CDATA[<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_30_348_Open_Image" onclick="this.style.display='none'; Codehighlighter1_30_348_Open_Text.style.display='none'; Codehighlighter1_30_348_Closed_Image.style.display='inline'; Codehighlighter1_30_348_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_30_348_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_30_348_Closed_Text.style.display='none'; Codehighlighter1_30_348_Open_Image.style.display='inline'; Codehighlighter1_30_348_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> CommandLineParam </span><span id="Codehighlighter1_30_348_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://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_30_348_Open_Text"><span style="color: #000000">{<br />
<img id="Codehighlighter1_71_346_Open_Image" onclick="this.style.display='none'; Codehighlighter1_71_346_Open_Text.style.display='none'; Codehighlighter1_71_346_Closed_Image.style.display='inline'; Codehighlighter1_71_346_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_71_346_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_71_346_Closed_Text.style.display='none'; Codehighlighter1_71_346_Open_Image.style.display='inline'; Codehighlighter1_71_346_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" /> </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(String args[])</span><span id="Codehighlighter1_71_346_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://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_71_346_Open_Text"><span style="color: #000000">{<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> </span><span style="color: #0000ff">int</span><span style="color: #000000"> a1,a2,a3;<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> </span><span style="color: #0000ff">if</span><span style="color: #000000">(args.length</span><span style="color: #000000"><</span><span style="color: #000000">2</span><span style="color: #000000">)<br />
<img id="Codehighlighter1_111_210_Open_Image" onclick="this.style.display='none'; Codehighlighter1_111_210_Open_Text.style.display='none'; Codehighlighter1_111_210_Closed_Image.style.display='inline'; Codehighlighter1_111_210_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_111_210_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_111_210_Closed_Text.style.display='none'; Codehighlighter1_111_210_Open_Image.style.display='inline'; Codehighlighter1_111_210_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" /> </span><span id="Codehighlighter1_111_210_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://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_111_210_Open_Text"><span style="color: #000000">{<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">Not Enough command line parameters is provideed</span><span style="color: #000000">"</span><span style="color: #000000">);<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> System.exit(</span><span style="color: #000000">0</span><span style="color: #000000">);<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> <br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" /> }</span></span><span style="color: #000000"><br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> a1</span><span style="color: #000000">=</span><span style="color: #000000">Integer.parseInt(args[</span><span style="color: #000000">0</span><span style="color: #000000">]);<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> a2</span><span style="color: #000000">=</span><span style="color: #000000">Integer.parseInt(args[</span><span style="color: #000000">1</span><span style="color: #000000">]);<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> a3</span><span style="color: #000000">=</span><span style="color: #000000">a1</span><span style="color: #000000">+</span><span style="color: #000000">a2;<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">Add</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">a1</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">with</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">a2</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">result in</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">a3);<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" /> }</span></span><span style="color: #000000"><br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br />
<img id="Codehighlighter1_350_469_Open_Image" onclick="this.style.display='none'; Codehighlighter1_350_469_Open_Text.style.display='none'; Codehighlighter1_350_469_Closed_Image.style.display='inline'; Codehighlighter1_350_469_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_350_469_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_350_469_Closed_Text.style.display='none'; Codehighlighter1_350_469_Open_Image.style.display='inline'; Codehighlighter1_350_469_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_350_469_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">/**/</span><span id="Codehighlighter1_350_469_Open_Text"><span style="color: #008000">/*</span><span style="color: #008000">D:\Program Files\Xinox Software\JCreatorV3\MyProjects\ccx9>java CommandLineParam<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> 31 -9<br />
<img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />Add31with-9result in22</span><span style="color: #008000">*/</span></span></div>
<img src ="http://www.aygfsteel.com/chenchuxin/aggbug/185258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/chenchuxin/" target="_blank">沉默奔跑è€?/a> 2008-03-11 09:44 <a href="http://www.aygfsteel.com/chenchuxin/articles/185258.html#Feedback" target="_blank" style="text-decoration:none;">å‘表评论</a></div>]]></description></item><item><title>å—符ä¸?http://www.aygfsteel.com/chenchuxin/archive/2008/03/10/185022.html沉默奔跑è€?/dc:creator>沉默奔跑è€?/author>Mon, 10 Mar 2008 04:25:00 GMThttp://www.aygfsteel.com/chenchuxin/archive/2008/03/10/185022.htmlhttp://www.aygfsteel.com/chenchuxin/comments/185022.htmlhttp://www.aygfsteel.com/chenchuxin/archive/2008/03/10/185022.html#Feedback5http://www.aygfsteel.com/chenchuxin/comments/commentRss/185022.htmlhttp://www.aygfsteel.com/chenchuxin/services/trackbacks/185022.html
import javax.swing.*;


public class StringTest2
{

public static void main(String args[])
{
String s1,s2,s3,s4,output;
s1=new String ("good morning");
s2=new String ("John");
s3=new String("How are you");
s4=new String(" how are you");
output="s1="+s1+"\ns2="+s2+"\ns3="+s3+"\ns4"+s4+"\n\n";
if(s1.equals("hello"))
output+="s1 equals\"hello\"\n";
else
output+="s1 dose not equal\"hello\"\n";
if (s3.equalsIgnoreCase(s4))
output+="s3 equals s4\n";
else
output+="s3 dose not equal s4\n";
if(s3.regionMatches(0,s4,0,5))
output+="First 5 characters of s3 and s4 match\n";
else
output+="First 5 characters of s3 and s4 do not match\n";
if(s3.regionMatches(true,0,s4,0,5))
output+="First 5 characters of s3 and s4 match\n";
else
output+="First 5 characters of s3 and s4 do not match\n";
output+="s1与s4˜qžæŽ¥èµäh¥æ˜¯ï¼š"+s1.concat(s4)+"\n";
output+="the first\"day\"of s4 is :"+s4.indexOf("you")+"\n";
output+="the last\"day\"of s4 is :"+s4.lastIndexOf("we");
JOptionPane.showMessageDialog(null,output,"Demonstring String Class CONstructors",JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}
}
//p133

]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º
ÌÒÔ´ÏØ|
ÐĮ̈ÊÐ|
¼ÃÔ´ÊÐ|
¿üÍÍÊÐ|
Í©è÷ÏØ|
èÈÑôÏØ|
¸Ê×Î|
ͨ»¯ÏØ|
·öËçÏØ|
ÎÚÀ¼²ì²¼ÊÐ|
ɽÒõÏØ|
ÎäÆ½ÏØ|
Ìï¶«ÏØ|
ÏĺÓÏØ|
¼ªÄ¾Èø¶ûÏØ|
´óÖñÏØ|
ÇɼÒÏØ|
ÐËÎÄÏØ|
ÄÏ¿µÊÐ|
³ÐµÂÊÐ|
ºç¿ÚÇø|
²ÊƱ|
ÓÀµÇÏØ|
ÎäÂ¡ÏØ|
·À³Ç¸ÛÊÐ|
¶«É½ÏØ|
¶ÁÊé|
¹ãÄÏÏØ|
Á¹³ÇÏØ|
ÄÏͶÊÐ|
À¼¿¼ÏØ|
×óÈ¨ÏØ|
Äþ½òÏØ|
½¨Ë®ÏØ|
ÐÁ¼¯ÊÐ|
ÎäÒÄɽÊÐ|
ÖêÖÞÊÐ|
³Ç¿ÚÏØ|
ɳÑÅÏØ|
»ôÖÝÊÐ|
ʯʨÊÐ|