Skip to content

Instantly share code, notes, and snippets.

@sanrodari
Forked from godie007/gist:2731475
Created May 19, 2012 17:23
Show Gist options
  • Save sanrodari/2731583 to your computer and use it in GitHub Desktop.
Save sanrodari/2731583 to your computer and use it in GitHub Desktop.
public class Ensayo {
public static void main(String[] args) {
String inv = "";
System.out.println(convertir("1234"));
}
public static String convertir(String num) {
String inv = "";
for (int i = num.length() - 1; i >= 0; i--) {
inv += num.charAt(i);
}
return inv;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment