Skip to content

Instantly share code, notes, and snippets.

View samterrell's full-sized avatar

Sam Terrell samterrell

View GitHub Profile
@samterrell
samterrell / ReverseString.java
Created April 24, 2012 00:33 — forked from gnarl/ReverseString.java
Recursive String Reverse
public class ReverseString {
public static void main(String[] argv) {
String origString = argv[0];
System.out.println(origString);
System.out.println(reverse(origString));
}
public static String reverse(String str) {
if(str.length()<=1) return str;