$30 off During Our Annual Pro Sale. View Details »

Modern Java with IntelliJ IDEA

Trisha Gee
October 27, 2020

Modern Java with IntelliJ IDEA

The current release cadence of a new version of Java every 6 months can be overwhelming. The releases might even contain preview features which are "complete" but may change with every new release until they finally stabilize. How can a real developer keep up with this? The good news is that your IDE can help. IntelliJ IDEA not only provides support for the latest versions of Java (even the ones that aren't released yet), it can also help us to discover and use the new language features. This way we can let the IDE help us to migrate to the latest and greatest, and we don't need to go researching for the relevant features every 6 months. In this session, Trisha will show the interesting language features in recent versions of Java, and show how IntelliJ IDEA makes these really easy to find and use.

Trisha Gee

October 27, 2020
Tweet

More Decks by Trisha Gee

Other Decks in Programming

Transcript

  1. IntelliJ IDEA
    ©JetBrains. All rights reserved
    Modern Java with
    IntelliJ IDEA
    Trisha Gee (@trisha_gee)
    Java Champion & Java Advocacy Lead, JetBrains

    View Slide

  2. Define “Modern
    Java”

    View Slide

  3. https://www.jetbrains.com/lp/devecosystem-2020/java/
    Despite the emergence of newer
    versions, Java 8 is still most
    beloved. It is used by 3/4 of Java
    developers. Java 11 is growing
    more popular. Compared to last
    year, its usage has increased by
    10 percentage points.

    View Slide

  4. https://flic.kr/p/8xhk74

    View Slide

  5. Java 11
    Long Term Support (LTS) Release; ~3 years support

    View Slide

  6. Java 15
    Current release; be prepared to upgrade in March 2021

    View Slide

  7. IntelliJ IDEA can
    help you

    View Slide

  8. View Slide

  9. Why bother?

    View Slide

  10. Super happy with Java 8,
    thanks

    View Slide

  11. Java 11

    Long Term Support (LTS) Release

    View Slide

  12. var

    View Slide

  13. Convenience Factory Methods for
    Collections

    View Slide

  14. Collecting to Unmodifable Collections

    View Slide

  15. New Methods on Optional

    View Slide

  16. Java 15

    Current Release

    View Slide

  17. Switch Expressions

    View Slide

  18. Switch Expressions
    https://jb.gg/ij-jdk12

    View Slide

  19. Text Blocks

    View Slide

  20. Text Blocks
    https://jb.gg/ij-jdk13

    View Slide

  21. Preview Features

    View Slide

  22. View Slide

  23. View Slide

  24. Pattern Matching for instanceof

    View Slide

  25. Pattern Matching for instanceof
    https://jb.gg/ij-jdk14

    View Slide

  26. Records

    View Slide

  27. Records
    https://jb.gg/ij-jdk14

    View Slide

  28. Sealed Types

    View Slide

  29. Sealed Types
    https://jb.gg/ij-jdk15

    View Slide

  30. Tips for Migration

    View Slide

  31. http://bit.ly/8-to-11

    View Slide

  32. Address compiler warnings

    View Slide

  33. Address compiler warnings
    …they are there for a reason

    View Slide

  34. Update your dependencies

    View Slide

  35. Update your dependencies
    And add new ones

    View Slide

  36. Update your build tool

    View Slide

  37. Update your build tool
    Updated Maven and Gradle required

    View Slide

  38. Let your tools do
    the hard work

    View Slide

  39. http://bit.ly/ij-modern-java
    @trisha_gee

    View Slide