注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
Implement a SubstringGenerator that generates all substrings of a string. For example, the substrings of the string "rum" are the seven strings
"r", "ru", "rum", "u", "um", "m", ""
Hint: First enumerate all substrings that start with the frst character. There are n of them if the string has length n. Then enumerate the substrings of the string that you obtain by removing the frst character. Using JAVA by reversion.
本人刚接触JAVE 对这样的问题实在找不到头绪。
|