import java.util.*;import java.lang.*; class Main{ public static void main (String[] args) throws java.lang.Exception { string a="abc"; system.out.println(reverse(a)); } public String reverse(String s) { if (s.length() <= 1) { return s; } return reverse(s.substring(1, s.length())) + s.charAt(0);} }
Standard input is empty
Main.java:8: cannot find symbol symbol : class string location: class Main string a="abc"; ^ Main.java:9: package system does not exist system.out.println(reverse(a)); ^ 2 errors
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!