Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File file = new File("D://student.txt");
- try{
- FileOutputStream fout = new FileOutputStream("student.dat");
- DataOutputStream fout = new DataOutputStream(fout);
- Scanner sc = new Scanner(file);
- sc.useDelimiter("\\Z");
- while(sc.hasNext()){
- String [] student = sc.next().split(",");
- System.out.println(Arrays.toString(student));
- If(integer.parseInt(student[2])>=3){
- out.writeUTF(student[0]);
- out.writeUTF(student[0]);
- out.writeUTF(student[0]);
- }
- }
- out.close();
- }
- close{
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment