Untitled
unknown
java
a month ago
333 B
2
Indexable
public class Reverse { static void reverseString(String s) { if(s.length() == 0){ return; } System.out.print(s.charAt(s.length()-1)); reverseString(s.substring(0,s.length()-1)); } public static void main(String[] args) { reverseString("abnbn"); } }
Editor is loading...
Leave a Comment