SHARE
TWEET

Untitled

a guest Sep 14th, 2017 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public class RecursiveReverser extends String
  2. {
  3. public RecursiveReverser(String input);
  4. public String  reverse(String input)
  5.     {
  6.     if(input.length()!=1)
  7.     {
  8.     String a =  input.substring(input.length()-1,input.length());
  9.     String b = input.substring(0,input.length-1);
  10.         return(a+ reverse(b));
  11.     }
  12.  
  13.  
  14.  
  15.  
  16. }
RAW Paste Data
Top