熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> JSP教程 >> 正文

用Java寫出一段string和stringbuffer的代碼

2022-06-13   來源: JSP教程 

class Test{
public static void main(String args[]){
String s=&#;&#;;
Systemoutprintln( new StringBuffer(s)reverse());
String s=&#;MicrosoftSun&#;;
StringBuffer sw=new StringBuffer(stoLowerCase());
StringBuffer ss=new StringBuffer(swsubstring())reverse();
Systemoutprintln(ss);
String s=&#;kico&#;;
StringBuffer st=new StringBuffer(s);
stinsert(s)insert(&#; &&#;);
Systemoutprintln(st);
}
}


From:http://tw.wingwit.com/Article/program/Java/JSP/201405/30944.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.