JAVA题库:考考你4
添加时间: 2007-9-22 6:18:59 作者: JAVA认证考试 阅读次数:327 来源: http://www.d9soft.com
public static void stringReplace(String text){
text=text.replace('j','l');
}
public static void bufferReplace(StringBuffer text){
text=text.append("c");
}
public static void main(String args[]){
String textString=new String("java");
StringBuffer textBuffer=new StringBuffer("java");
stringReplace(textString);
bufferReplace(textBuffer);
System.out.println(textString+textBuffer);
}
}
what is the output? 答案:"javajavac"
上下文章:
上一篇文章: JAVA题库:考考你2 下一篇文章: 格林模拟试题二参考答案(1)
相关文章:
相关软件:

