Billy Korando πŸƒβ˜•οΈ 🐈🐈 Profile picture
#Java Developer Advocate @Oracle β˜•οΈπŸ₯‘. @KCJUG co-organizer. Formerly; @IBM, @KeyholeSoftware, @niprcom. Opinions are my own. Trolled by @briseida_ko πŸ’

May 27, 2022, 7 tweets

Hey #Java developers, β˜•οΈ

Here is your Friday #SipOfJava thread! 🧢🐈

Needing to automate a task? Consider writing it in Java! Recent changes, and some long-existing APIs, have made Java a practical choice for writing small utility apps. Let's take a look!

1/7

Added in JDK 11, the java launcher can now directly launch single-file source-code applications. Making it easier to develop and launch small utility apps.

Article: inside.java/sip/003/

2/7

Local-variable type inference (var) was added in JDK 10. var can make it easier when working with complex types (i.e. when generics are involved) and easier to define variables in applications.

3/7

Templating out files is often a need for scripts. Text blocks added in JDK 15 make this much easier. Let's look at how to use Text Blacks:

Article: inside.java/sip/004/

4/7

Reading contents from files is also a common need when writing scripts and other small utility apps. Here are a few improvements in recent releases for efficiently processing and filtering file contents.

Article: inside.java/sip/012/

5/7

Some long-existing APIs can help with providing an interactive command-line experience or efficiently navigating the file system.

Article: inside.java/2022/05/23/sip…

6/7

Happy coding!

7/7

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling