Reverse

Run Settings
LanguageJava
Language Version
Run Command
class Main { public static void reverse(String str) { char[] s=str.toCharArray(); char[] rstr; rstr=new char[10]; int j=0; for(int i=s.length;i>0;i--) { rstr[j]=s[i]; j++; } for(j=0;j<rstr.length;j++) { System.out.println(rstr[j]); } } public static void main(String[] args) { Main m=new Main(); m.reverse("KING"); } }
Editor Settings
Theme
Key bindings
Full width
Lines