Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package practica2;
- import java.io.BufferedReader;
- import java.io.FileNotFoundException;
- import java.io.FileReader;
- import java.io.IOException;
- import java.util.HashSet;
- public class practica2 {
- String variables[];
- HashSet<String []> datos = new HashSet<String[]>();
- public static void main (String Args[]) {
- }
- public void leerfichero(String archivo) throws FileNotFoundException,IOException{
- String linea;
- String [] palabras;
- FileReader fichero= new FileReader(archivo);
- BufferedReader buffer= new BufferedReader(fichero);
- int cont=0;
- while(buffer.readLine()!=null) {
- linea=buffer.readLine();
- if(cont==0){
- variables= linea.split(",");
- }
- else {
- palabras=linea.split(",");
- datos.add(palabras);
- }
- cont++;
- }
- buffer.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement