Upgrade to Pro — share decks privately, control downloads, hide ads and more …

これからのJavaのとっかかりを掴む

irof
June 07, 2023

 これからのJavaのとっかかりを掴む

2015-04-08 Java Day Tokyo 2015
2015-10-05 秋の関ジャバ祭り https://kanjava.connpass.com/event/14086/

Slideshareに上げているものと同じです。

irof

June 07, 2023
Tweet

More Decks by irof

Other Decks in Technology

Transcript

  1. USZXJUISFTPVSDFT Closeable resource = create();
 try {
 // resource Λ࢖͏ॲཧ...


    } finally {
 resource.close();
 } try (AutoCloseable resource = create()) {
 // resource Λ࢖͏ॲཧ...
 }
  2. 4USJOH4XJUDI switch (str) {
 case "java":
 // ...
 break;
 case

    "groovy":
 // ...
 break;
 default:
 // ...
 } OVMM͜Θ͍ CSFBLΊΜͲ͍ JGͰॻ͘ΑΓ
 ߦ਺ଟ͍
  3. ϚϧνΩϟον try {
 this.getClass().getMethod("method").invoke(this);
 } catch (IllegalAccessException
 | NoSuchMethodException
 |

    InvocationTargetException e) {
 // ...
 } try {
 this.getClass().getMethod("method").invoke(this);
 } catch (ReflectiveOperationException e) {
 // ...
 } ϦϑϨΫγϣϯ͸جఈྫ֎ΫϥεͷDBUDIͰΑ͛͞
  4. /*0 List<String> lines = new ArrayList<String>();
 BufferedReader br = new

    BufferedReader(
 new InputStreamReader(
 new FileInputStream(fileName), StandardCharsets.UTF_8));
 for (String line; (line = br.readLine()) != null; ) {
 lines.add(line);
 } List<String> lines = Files.readAllLines(path); 🌾DMPTFলུ
  5. -BNCEB&YQSFTTJPO (String arg) -> { /* ͳΜ͔ॲཧ */ } arg

    -> /* ͳΜ͔ࣜ */ System.out::println .FUIPE3FGFSFODF
  6. J2SE 5.0 Java SE 6 Java SE 7 Java SE

    8 ೥લ  ೥લ 
  7. J2SE 5.0 Java SE 6 Java SE 7 Java SE

    8 ೥લ  ೥લ  ໿೥