public class Main { public static String terscevir(String str) { if(str.equals(""))// (str.equals("")) return ""; else return String.valueOf(str.charAt(str.length() -1)) + terscevir(str.substring(0,str.length() -1)); } public static void main(String[] args) { String sonuc = terscevir("erkant"); System.out.println(sonuc); } }