Guest User

Untitled

a guest
Nov 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. 1,375,seller
  2. 1,375,sellers
  3. 1,375,send
  4. 1,375,sister
  5. 1,375,south
  6. 1,375,specific
  7. 1,375,spoiler
  8. 1,375,stamp
  9. 1,375,state
  10. 1,375,stop
  11. 1,375,talked
  12. 1,375,tenant
  13. 1,375,today
  14. 1,375,told
  15.  
  16. FileInputStream fstream = new FileInputStream("e://inputfile.txt");
  17. // Use DataInputStream to read binary NOT text.
  18. BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
  19. String strLine;
  20.  
  21. while ((strLine = br.readLine()) != null)
  22. {
  23. Vector dataPoints = new Vector();
  24. dataPoints.add(br);
  25.  
  26.  
  27. dataPoints.add(new DataPoint());
  28. }
  29.  
  30.  
  31. ------ public DataPoint(double x, double y, String name) this is the method
  32.  
  33. Vector<DataPoint> dataPoints = new Vector<DataPoint>();
  34. while ((strLine = br.readLine()) != null) {
  35. String[] array = strLine.split(",");
  36. dataPoints.add(new DataPoint(Double.parseDouble(array[0]), Double.parseDouble(array[1]), array[2]));
  37. }
  38.  
  39. Vector<DataPoint> dataPoints = new Vector<DataPoint>();
  40. while ((strLine = br.readLine()) != null)
  41. {
  42. String[] arr = strLine.split(",");
  43. DataPoint point = new DataPoint(Double.valueOf(arr[0]), Double.valueOf(arr[1]), arr[2]);
  44. dataPoints.add(point);
  45. }
Add Comment
Please, Sign In to add comment