This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int one_million = 1_000_000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void sayHello(String language){ | |
switch(language) { | |
case "FR" : System.out.println("Bonjour"); break; | |
case "EN" : System.out.println("Hello World"); break; | |
case "JP" : System.out.println("Sayonara"); break; | |
default: System.out.println(" Hello World"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Un nombre au format hexa | |
int hexa = 0x12345; | |
//Un nombre au format binaire | |
int binary = 0b01110111; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void readFile(String path) { | |
BufferedReader buffer = null; | |
try { | |
buffer = new BufferedReader(new FileReader(path)); | |
String line; | |
while( (line = buffer.readLine()) != null){ | |
System.out.println(line); | |
} | |
} catch (FileNotFoundException fne) { | |
System.out.println("File Not found"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try(BufferedReader buffer = new BufferedReader(new FileReader(path))){ | |
String line; | |
while( (line = buffer.readLine()) != null){ | |
System.out.println(line); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String, Map<String, List<String>>> map = new HashMap<String, Map<String, List<String>>>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String, Map<String, List<String>>> newmap = new HashMap<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catch (IOException|SQLException ex) { | |
logger.log(ex); | |
throw ex; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catch (IOException ex) { | |
logger.log(ex); | |
throw ex; | |
catch (SQLException ex) { | |
logger.log(ex); | |
throw ex; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.grosdim.randomCallable; | |
public class CallableExample { | |
static final int NB_THREADS = 5; | |
public static class StringCallable implements Callable<String>{ | |
private String stringToUpper; |
OlderNewer