Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class AltifLiad {
- public static void main(String[] args) {
- String str="Liad Altif";
- Reverse(str);
- }
- public static void Reverse(String str)
- {
- if (str.length()==0)
- System.out.print("");
- else
- {
- System.out.print(str.charAt(str.length()-1));
- Reverse(str.substring(0,str.length()-1));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement