Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> As of Java 23, three methods are automatically imported from java.io.IO: println, print, readln

I thought they had just hallucinated `java.io.IO`, but apparently it's a new type, available in Java 23 with --enable-preview: https://docs.oracle.com/en/java/javase/23/docs/api/java.base...



It looks like they took lots of inspiration from Kotlin with these new implicit imports and their structure.


Groovy and Scala already did that way before Kotlin.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: