Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void MostrarDatosArchivo(){
- try{
- File f = new File ("Datos.txt");
- if (f.exists()){
- FileReader fr = new FileReader(f);
- BufferedReader br = new BufferedReader(fr);
- String linea;
- while((linea = br.readLine()) !=null){
- String[] arreglo = linea.split("%");
- if (arreglo[5].equals("1")){
- Persona persona = new Persona(arreglo[0], arreglo[1], arreglo[2], arreglo[3],arreglo[4]);
- System.out.println(persona.toString());
- }//ifarreglo
- }//while
- br.close();
- fr.close();
- }//if
- }catch(Exception e){
- System.out.println("Error de S/E" + e);
- }//TryCatch
- }//FinMostrarDatos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement