public class Rep { private static String dossier="images/Lebration"; public static void main(String arg[]) { if(!new File(dossier).exists()) { // Créer le dossier avec tous ses parents new File(dossier).mkdirs(); } } } |
A voir sur le même Sujet
-
Démonstration de autoboxing et unbox: Exemple simple*
{filelink=11192} public class AutoBox { public static void main(String args[]) { Integer obI = 150; // autobox d’un int int i = obI; // auto-unbox …
-
Autobox et unbox à l’interieur d’une expression
{filelink=11194} public class ExpAutoBox { public static void main(String args[]) { Integer obI, obI2; int i; obI = 150; System.out.println(“La valeur originale de obI: ” …
-
Autobox et unbox: Mixage de Integer et Double
{filelink=11195} public class DoubleAutoBox { public static void main(String args[]) { Integer obI = 100;; Double obD = 17.5; obD = obD + obI; System.out.println(“obD …
-
Autobox et unbox: Exemple des types booléens et caractères*
{filelink=11196} public class BooléenEtCharBox{ public static void main(String args[]) { Boolean b = true; //Ici, le b est auto-unboxé lorsqu’il est utilisé dans une expression …
-
Autobox et unbox: mauvaise conversion*
{filelink=11197} public class UnboxingError { public static void main(String args[]) { Integer iOb = 1000; // autobox the value 1000 int i = iOb.byteValue(); // …
-
Autobox et unbox
{filelink=11198} /* License for Java 1.5 ‘Tiger’: A Developer’s Notebook (O’Reilly) example package */ public class ConversionTester { public static void main(String[] args) { Integer …
-
Autobox: Autoboxer et int
{filelink=11199} public class AutoboxDemo { public static void main(String[] args) { int i = 42; foo(i); } public static void foo(Integer i) { System.out.println(“Objet = …
-
Exemple de Autoboxing: Conversion entre int et Integer*
{filelink=11190} import java.util.HashMap; import java.util.Map; public class Main { public static void main(String[] args) { Map map = new HashMap(); map.put(“Age”, 25); int age = …
-
Conversion entre les types: Mixage de type int et Integer
{filelink=11191} public class Main { public static void main(String… args) { Integer integer = 1; // Affecter Int à Integer System.out.println(integer); // mixer Int et …
-
Mot Clé ‘break’: Chercher une éléments dans un tableau
{filelink=4314} public class BreakDemo { public static void main(String[] args) { int[] arrayDeInts = { 32, 87, 3, 589, 12, 1076, 2000, 8, 622, 127 …