hola quiero invertir una palabra esto es lo que he hecho no se porque no me funciona
import java.util.*;
import java.io.*;
import java.lang.*;
public class probando {
public static void main(String[] args) throws IOException {
Scanner sca = new Scanner(System.in);
String [] arr= new String [20];
boolean num= true;
String a;
int i=0;
int p=0;
String [] [] mundonovedoso= new String [20] [20];
while (num= true){
mundonovedoso[i][p]= sca.next();
if (mundonovedoso[i][p].equals("fin"))
num= false;
char [] caracteres= mundonovedoso[i][p].toCharArray();
int n = caracteres.length;
char []swap= new char [n];
int n1= n-1;
int nn=0;
for (int j=n1; j==0; j--, nn++){
swap[nn]= caracteres[j];
}
String convertir= new String (swap);
System.out.println("la palabra es: "+ mundonovedoso[i][p]);
System.out.println("al reves es: "+ convertir);
i++;
}
}
}