fala pessoal, tentei implementar este exemplo, mas naum deu certo...
O q pode estar de errado com meu codigo?
import java.io.*;
public class teste4{
public static void main (String args[]) throws java.io.IOException{
int i;
BufferedReader leitor = new BufferedReader(new InputStreamReader (System.in));
System.out.println("Digite um nome:");
String nome = leitor.readLine();
for (i=0; i<nome.length; i++){
int x=0;
x = nome.charAt(i);
System.out.println(x);
}
}
}
Está dando um erro nesta linha:
for (i=0; i<nome.length; i++){
cannot find symbol variable length
