maaya ishida
I'm system engineer in Tokyo. I join ... - Java Women Group Tokyo - PyLadies Tokyo
FileWriter fw = null;
try {
fw = new FileWriter("tdsSummer.txt");
fw.write("Pirates of the Caribbean");
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
fw.close();
} catch (IOException e) {
System.out.println("クローズ失敗");
}
}
try( FileWriter fw = new FileWriter("tdsSummer.txt") ){
fw.write("Pirates of the Caribbean");
}catch(IOException e){
e.printStackTrace();
}
List<String> disneyParks = new ArrayList<String>();
List<String> disneyParks = new ArrayList<>();
static void m(List<String>... stringLists) {
Object[] array = stringLists;
List<Integer> tmpList = Arrays.asList(42);
array[0] = tmpList;
String s = stringLists[0].get(0);
}
@SafeVarargs
static void m(List<String>... stringLists) {
Object[] array = stringLists;
List<Integer> tmpList = Arrays.asList(42);
array[0] = tmpList;
String s = stringLists[0].get(0);
}
private void writeMWords(BufferedWriter writer, String words)
throws IOException {
try(BufferedWriter writer2 = writer) {
writer2.write("ハハッ! " + words);
}
}
private void writeMWords(final BufferedWriter writer, String words)
throws IOException {
try(writer) {
writer.write("ハハッ! " + words);
}
}
Tds<String,String> f = new Tds<String,String>(){
public String create(String name){
return "ポートディズカバリー";
}
};
Tds<String,String> f = new Tds<>(){
public String create(String name){
return "ポートディズカバリー";
}
};
By maaya ishida
I'm system engineer in Tokyo. I join ... - Java Women Group Tokyo - PyLadies Tokyo