Array que tem Erro de variavel

Fiz, este codigo para variavel CHAR, mais não está funcionando. Então estou usando String. Eu gostaria que foste com Char.
onde eu estou errando!?
Outro detalhe no for está com erro de logica que não consigo enchegar o erro. Alguem pode ajudar?
grato.

import javax.swing.JOptionPane.*;
public class Atbash
 {
  public static void main(String args[])
   {
     String  a = new String();
     String [] b = {"A","B","C","D","E","F","G","H","I","J","K","L","M"};
     String [] c = {"Z","Y","X","W","V","U","T","S","R","Q","P","O","N"}; 
    do {
    	String x;
    	x = javax.swing.JOptionPane.showInputDialog("Escrevas os paises:");
    	a = x; 
       } while(!a.equals("."));	
    for(int i=0; i<a.length; i++)
     {
     System.out.println(a[i]);
     
     }
     System.exit(0);
   }
 }

[size=“11”][color=“red”]* Editado: Lembre-se de utilizar BBCode em seus códigos - Matheus [/color][/size]

Apesar de uma String “ser” um vetor de caracteres, ela não pode ser acessada como um vetor normal.

Na String, o “length” é uma função, por isso, você deve usar length().
Para pegar um caracter da String, também, você deve usar a função charAt (int posicao).

Seu código ficaria alguma coisa assim:

import javax.swing.JOptionPane.*;
public class Atbash
{
	public static void main(String args[])
	{
		String a = new String();
		String [] b = {"A","B","C","D","E","F","G","H","I","J","K","L","M"};
		String [] c = {"Z","Y","X","W","V","U","T","S","R","Q","P","O","N"};
		do 
		{
			String x;
			x = javax.swing.JOptionPane.showInputDialog("Escrevas os paises:");
			a = x;
		} 
		while(!a.equals("."));
		
		for(int i=0; i<[b]a.length(); [/b]i++)
			System.out.println(a.[b]charAt(i)[/b] );
		System.exit(0);
	}
}

[size=“12”][color=“red”]* Editado: Lembre-se de utilizar BBCode em seus códigos - Matheus [/color][/size]

Aê amigo,fiz coisa parecida,se conseguir ajudar…

import javax.swing.JOptionPane;

public class Exemplo
{
   public static void main(String args[])   
   {
   	    String saida = "";
   	    String	s;
   		String a[] = new String[15];
		//String [] b = {"A","B","C","D","E","F","G","H","I","J","K","L","M"};
		//String [] c = {"Z","Y","X","W","V","U","T","S","R","Q","P","O","N"};
		do {
			int i = 0;
			String x;
			x = JOptionPane.showInputDialog("Escrevas os paises:");
			a[i] = x;
			i++;
			s = JOptionPane.showInputDialog("Deseja continuar(S/N)?");
		} while(s.equalsIgnoreCase("S"));
		for(int i=0; i < a.length; i++)
		{
			if(a[i] != null)
			   saida += a[i] + "\n";

		}
		JOptionPane.showMessageDialog(null,saida,"PAISES",JOptionPane.INFORMATION_MESSAGE);
		
		System.exit(0);
	}
}

Valew!!!