0
I’m making the following mistake:
cannot find simbol.
He gives in the method Return, I checked my code and could not locate anything wrong.
Follow the code below:
public ArrayList<String> verificarUsuario(){
try {
FileInputStream arquivo = new FileInputStream(caminho+"\\administrador.txt");
InputStreamReader entrada = new InputStreamReader(arquivo);
BufferedReader ler = new BufferedReader(entrada);
String linha;
ArrayList<String>dados = new ArrayList<String>();
do{
linha = ler.readLine();
if(linha!=null){
String[]palavra = linha.split(";");
for(int i =0;i<palavra.length;i++){
dados.add(palavra[i]);
}
}
}
while(linha!=null);
arquivo.close();
} catch (FileNotFoundException ex) {
JOptionPane.showMessageDialog(null, "Erro: Arquivo não encontrado!");
}catch(IOException err){
JOptionPane.showMessageDialog(null, "Erro: "+err.getMessage());
}
return dados;
}
Put a space between
ArrayList<String>
anddados
, see if it works.– Piovezan
Young man, I’ll give you some tips to write a question: 1. Try to put a title that gives an explanation about your problem, nothing so abstract; 2. Don’t forget to let us know what language; 3. Explain your problem better, calmly. You can always improve your publication by clicking on [Dit]
– Jéf Bueno
I managed to fix it here already, I used the Netbeans patch that asked to create the data field in the class.
– Yure Santana