ivana_andreevska

Proverka za dali e direktorium

Feb 25th, 2022
933
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 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(".");
  7.         File[] lista=file.listFiles();
  8.         for(int i=0;i<lista.length;i++)
  9.         {
  10.             System.out.println(lista[i].getName() +" " + lista[i].isDirectory());
  11.         }
  12.  
  13.     }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment