I now have Java 11 (not even latest). And you can run your code even without compiling. And that deep down in everyone's heart everyone misses Pascal. now there is "var" to define variable without specifying the type just like many languages. Other dynamic typed languages like Javascript and Visual Basic has this for ages.
class Foo { public static void main(String arg[]) { var yes = true; System.out.println("Do you miss Pascal?"+ yes); } }I can run this with just "java Foo.java". I don't even need "javac" to compile it.
It compile behind the scene and does not even produce a .class file. This is a great write up of what's from 8 to 11. https://codete.com/blog/java-8-java-11-quick-guide/... but version 8 really was the major jump. Lambda and Streams and Optional stuff are just some of them. See here for a good list.
3 comments:
Post a Comment