Java: Verifier l’existance d’un fichier

Author:

 fichier, java
{filelink=12359}

import java.io.*;

public class Fichier_Exis
{
  public static void main(String args[])
  	{
    File f = new File("c:/sakoba.txt");
    System.out.println      (f + (f.exists()? " existe " : " n'existe pas "));
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *