Número inverso en Java
import java.util.*;
class reverse
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter String: ");
String str = sc.next();
char d;
String str2 = "";
int l = str.length();
for(int i = l-1; i >= 0; i--)
{
d = str.charAt(i);
str2 = str2 + d;
}
System.out.println(str2);
sc.close();
}
}
Poised Parrot