Advertisement
ivana_andreevska

Kreiranje nova papka i renaming

Feb 25th, 2022
1,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. import java.io.*;
  2. import java.io.File;
  3.  
  4. public class Main {
  5.     public static void main(String[] args) throws IOException {
  6.     File file=new File("pom.txt");
  7.     //kreiranje nov direktorium
  8.         file.mkdir();
  9.         file.mkdirs(); //rekurziven povik
  10.         file.renameTo(new File("pom"));
  11.     }
  12.  
  13.  
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement