标题:不知道怎么改啊
取消只看楼主
xiix
Rank: 1
等 级:新手上路
帖 子:64
专家分:0
注 册:2006-5-18
 问题点数:0 回复次数:1 
不知道怎么改啊
//实现字符串的逆转
import java.io.*;
import java.util.*;
class WriteBackWard{
public static void main(String[] args){
String s="cat";
System.out.println("enter writebackward ,string"+s);
String writebackward(String s){
if(s.length()==0 ){}
//{do nothing --this is the base case}
else
{
System.out.println("About to write the cast derection of string"+s);
System.out.println(s.substring(s.length()-1,s.length()));
s=s.substring(s.length()-1,s.length());
writebackward(s);
}//end if
}//end function
}//end main
}//the end
搜索更多相关主题的帖子: nothing public import 字符串 write 
2007-05-16 16:08
xiix
Rank: 1
等 级:新手上路
帖 子:64
专家分:0
注 册:2006-5-18
得分:0 
恩确实简单 不过我的错了吗 我运行的时候 出现错误 给我个解答 感谢了
2007-05-17 08:37



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-139884-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.841534 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved