Guest User

Untitled

a guest
Jul 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package proguppg_v10;
  7.  
  8. import java.util.*;
  9. import java.io.*;
  10.  
  11. /**
  12. *
  13. * @author Anders
  14. */
  15. public class Pu5c {
  16.  
  17. /**
  18. * @param args the command line arguments
  19. */
  20. public static void main(String[] args) {
  21. try
  22. {
  23. BufferedWriter out = new BufferedWriter(new FileWriter("src/proguppg_v10/Personfil.txt", true));
  24. Scanner sc = new Scanner(new FileInputStream("src/proguppg_v10/Personfil.txt"));
  25.  
  26. while(sc.hasNextLine()){
  27. PersonU4 person = new PersonU4(sc.nextLine());
  28. if(person.geLängd() > 199){
  29. out.write("bosse\r\n");
  30. }
  31. }
  32. sc.close();
  33. out.close();
  34. }catch(Exception e){System.out.println(e);}
  35. }
  36.  
  37. }
Add Comment
Please, Sign In to add comment