CyberArmy University | Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Services & Projects

RE: Java - Backwards - Second Draft


[Replies] [Reply] [View by Thread] [Help]
[Back To SNEAK Development Forum]

Posted by Lt dopel On 2005-02-26 16:51:44
In Reply to Java - Backwards - Second Draft Posted by Cpt SAJChurchey On 2005-02-24 20:18:01

Lt
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:


Guest:
Subject:
Message:
Signature:
Optional Image Link:
http://

CyberArmy::Forum v0.6
Generated In 0.02251 seconds


About Us | Privacy Policy | Mission Statement | Help