I have been messing around with recursion today. Often a programming technique that is not used enough.
I set out to recursively reverse a string. Here\'s what I cam
If you think less code is good then....
static String reverse(String str){ return str.length()>=2 ? str.charAt(str.length()-1) + reverse(str.substring(0,str.length()-1)) : str ; }