Skip to content

Instantly share code, notes, and snippets.

@zhensongren
Created April 5, 2015 02:05
Show Gist options
  • Save zhensongren/a97c9526a8cb67811c29 to your computer and use it in GitHub Desktop.
Save zhensongren/a97c9526a8cb67811c29 to your computer and use it in GitHub Desktop.
CareerCup 1.2
//CareerCup 1.2 Reverse a string by StringBuilder.
class StringReverse {
public static void main(String args[]) {
System.out.println("before: " + args[0]);
String s = new StringBuilder(args[0]).reverse().toString();
System.out.println("after: " + s);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment