Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.io.File;
- public class Main {
- public static void main(String[] args) throws IOException {
- DataInputStream reader=new DataInputStream(new FileInputStream("vlez.txt"));
- //ako sakame da citame od file od InputStreamReader mora da imame new FileInputStream
- DataOutputStream writer=new DataOutputStream(new FileOutputStream("izlez.txt"));
- //da zapsuvam char double bool int..
- float pom=1;
- while (pom!=0.0)
- {
- pom=reader.readFloat();
- //read line zima bez nov read so nov red
- writer.writeFloat(pom);
- }
- reader.close();
- writer.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment