Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class AltifLiad {
  3.  
  4.     public static void main(String[] args) {
  5.         String str="Liad Altif";
  6.         Reverse(str);
  7.     }
  8.     public static void Reverse(String str)
  9.     {
  10.         if (str.length()==0)
  11.             System.out.print("");
  12.            
  13.         else
  14.         {
  15.             System.out.print(str.charAt(str.length()-1));
  16.             Reverse(str.substring(0,str.length()-1));
  17.         }
  18.        
  19.    
  20.        
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement