Guest User

Untitled

a guest
Jun 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package Test;
  6.  
  7. import java.io.*;
  8.  
  9. public class Import extends Exception{
  10.  
  11.  
  12. public void lesen() throws IOException
  13. {
  14. int counter=0;
  15. FileReader fr = new FileReader("C:\\Users\\Mathias Elmlinger\\Desktop\\Test.txt");
  16. BufferedReader br = new BufferedReader(fr);
  17.  
  18. double vals[] = new double[1000];
  19. double vals2[] = new double[1000];
  20.  
  21.  
  22.  
  23. while(br.readLine() !=null){
  24.  
  25. String temp[] = br.readLine().split(";");
  26.  
  27.  
  28. vals[counter] = Double.parseDouble(temp[0]);
  29. vals2[counter+1] = Double.parseDouble(temp[1]);
  30.  
  31. counter=counter+1;
  32.  
  33.  
  34.  
  35. }
  36. System.out.println(vals + "," + vals2);
  37. br.close();
  38.  
  39. }
  40.  
  41. }
Add Comment
Please, Sign In to add comment