RE: Java - Backwards - Second Draft |
||
![]() Lt dopel Maybe? public static String Backwards(String str){
str = str.trim();
if(str == null || str.equals("")){
//Probably should throw some type of exception here
return "";
}
StringBuffer newString = new StringBuffer(str);
return newString.reverse().toString();
}
Replies:
|
||
| CyberArmy::Forum v0.6 Generated In 0.02251 seconds |