Advertisement
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 {
- File file = new File("path2.txt"); // kreiram nov txt file
- /*
- fileot se naoga vo src oti tamu se pisuva momentalno
- ako sakam da kreiram mozam i vo drugi pateki
- File file=new File("C:/Users/Nesto/Desktop/path/txt");
- File file=new File("C:/
- */
- file.createNewFile();
- if (file.exists()) {
- //proverka dali file-ot postoi
- System.out.println(file.length());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement