Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

fichero a Hashset

a guest Nov 14th, 2018 73 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. package practica2;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.FileNotFoundException;
  5. import java.io.FileReader;
  6. import java.io.IOException;
  7.  
  8. import java.util.HashSet;
  9.  
  10. public class practica2 {
  11.     String variables[];
  12.     HashSet<String []> datos = new HashSet<String[]>();
  13.     public static void main (String Args[]) {
  14.        
  15.     }
  16.    
  17.     public void leerfichero(String archivo)  throws FileNotFoundException,IOException{
  18.         String linea;
  19.         String [] palabras;
  20.         FileReader fichero= new FileReader(archivo);
  21.         BufferedReader buffer= new BufferedReader(fichero);
  22.         int cont=0;
  23.         while(buffer.readLine()!=null) {
  24.             linea=buffer.readLine();
  25.             if(cont==0){
  26.                 variables= linea.split(",");
  27.             }
  28.             else {
  29.                 palabras=linea.split(",");
  30.                 datos.add(palabras);
  31.             }
  32.             cont++;
  33.         }
  34.        
  35.         buffer.close();
  36.     }
  37.    
  38.    
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top