daily pastebin goal
52%
SHARE
TWEET

zadanie 2 dokończ

Varasku Jan 24th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       File file = new File("D://student.txt");
  2.       try{
  3.       FileOutputStream fout = new FileOutputStream("student.dat");
  4.       DataOutputStream fout = new DataOutputStream(fout);
  5.       Scanner sc = new Scanner(file);
  6.           sc.useDelimiter("\\Z");
  7.             while(sc.hasNext()){
  8.         String [] student = sc.next().split(",");
  9.         System.out.println(Arrays.toString(student));
  10.         If(integer.parseInt(student[2])>=3){
  11.                out.writeUTF(student[0]);
  12.                out.writeUTF(student[0]);
  13.                out.writeUTF(student[0]);
  14.                 }
  15.             }
  16. out.close();
  17.       }
  18.       close{
  19.      
  20.        
  21.     }
  22.    
  23. }
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