Demo entry 6355343

Reversed

   

Submitted by InaS on Apr 13, 2017 at 16:49
Language: Java. Code size: 217 Bytes.

String reverse(String a) {
 String result = "";
 int l = a.length();
 for (int i = 0; i < l; i++) {
  result = a.charAt(i) + result;
 }
 return result;
}
String str = reverse("REDRUM");
System.out.print(str);

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).