DEV Community

Cover image for Java In 2019 And Beyond

Java In 2019 And Beyond

Lemuel Ogbunude on December 25, 2018

What comes to your mind when you hear the word Java? For some people, they remember a very verbose programming language taught to them in their C...
Collapse
 
lemuelogbunude profile image
Lemuel Ogbunude

What Oracle is saying is that OpenJDK would be supported for at least 6 months period after a release. Enterprises are more conservative and would want longer support so would get paid support from Oracle for longer periods.

Like I said OracleJDK and OpenJDK are functionally interchangeable.

But let's say you hate Oracle and do not want to use their JDK, no problem, you have other providers of production-ready OpenJDK,

For example, Amazon Corretto comes with long-term support that will include performance enhancements and security fixes. Amazon runs Corretto internally on thousands of production services.

You have other providers like AdoptOpenJDK.

Also, I agree with you that Java was is big on Android but if we look back, Java(1995) was around way before Android came (2008), Java was a top language way before Android came.

Java is used in many other areas apart from Android.

Java is currently used heavily in Big data, Artificial intelligence, IOT, backend development and critical systems.

I still say Oracle has work to do though, and they are working, like you said, MS and Apple are doing quite well.

I have looked at Swift and it's a lovely language.

Collapse
 
lysofdev profile image
Esteban Hernández

Spring is keeping Java alive despite great competition from Go and Rust in the server-side. Android, of course, keeps the JVM alive with Kotlin. I personally like Java's verbose style and I'd say a lot of the hate comes from people who aren't too familiar with Java's idioms. My only real criticism is the amount of memory that the JVM requires to run medium to large applications but this has been improving bit by bit.

Collapse
 
lemuelogbunude profile image
Lemuel Ogbunude

Yeah, Java is big on Spring.

And yes, a lot of hate for Java comes from people who aren't too familiar with the 'Java looks'. For example, someone coming from a C++ background might not have as many issues with Java as someone coming from a strictly Javascript background.

But as programmers, it's always good to explore other languages than the ones we are comfortable with, it helps us see things in different ways.

Collapse
 
andevr profile image
drew

As someone e who is just now learning Java, (8/11) I really love Java syntax and "verbose style" as well, in my opinion it makes it more readable. I had a really difficult time learning Javascript and understanding what was happening. Not so with Java.

Collapse
 
michael_vt_native profile image
Michael

Nicely said! I, too, think Java is seeing a revival thanks in large part to Spring and later Kotlin. JDK 11+ is getting even more exciting (as exciting as Enterprise App Dev gets).

And this is coming from a dynamic language traditionalist who grew up on PHP and ASP ;)

Collapse
 
saint4eva profile image
saint4eva

ASP is not dynamic.

Collapse
 
michael_vt_native profile image
Michael

Ah, but I'm talking the original ASP - Classic ASP - before the modern .NET version.

Collapse
 
arminreichert profile image
Armin Reichert

IntStream.rangeClosed(1, 10)
.filter(i -> i % 2 == 0)
.forEach(System.out::println);

Collapse
 
lemuelogbunude profile image
Lemuel Ogbunude

Yes, thank you Armin. I should have mentioned I used a static import of IntStream, that's why I didn't use "IntStream'.

Collapse
 
arminreichert profile image
Armin Reichert

It's not about the static import (which is fine), it's the unnecessary creation of an intermediate collection.

Thread Thread
 
lemuelogbunude profile image
Lemuel Ogbunude • Edited

Oh lol, my initial desire was to answer the "Lecturer's question" and create a list first, so the code was initially different.

It initially created a list, assigned it to a variable and then worked on it, but when I shortened the code I didn't bother on (I might have felt lazy :/) to remove the creation of an intermediate collection.

Thanks for the advice though.

 
elmuerte profile image
Michiel Hendriks

That says that Oracle isn’t going to support older Java versions, only working on the current and next versions. Which means other companies have to pick up backporting of fixes where needed. Something which has been going on for years already. (As the linked article also mentions wrt to Java 6 and 7)

Collapse
 
halileohalilei profile image
Halil Ibrahim Kayim

Thanks for this write-up. I am one of those people that hates Java after using more modern languages, but I was on the lookout for Java’s new features. I had really liked the changes in 8 and 9, but it still felt like it wasn’t there yet and I didn’t bother checking out the later updates. I may give it another go with all these new features.

Collapse
 
lemuelogbunude profile image
Lemuel Ogbunude

Yeah, Java was lacking a lot of features that modern languages gave.

Java is improving and we are seeing a lot of changes.

It wouldn't hurt giving it another try.

Collapse
 
elmuerte profile image
Michiel Hendriks

What do you mean Oracle is not supporting OpenJDK ? They are still actively contributing to it, and it is the reference Java implementation. GraalVM also depends on OpenJDK.
And besides Oracle there are other big companies who also back OpenJDK.

Collapse
 
pradeepravi profile image
Pradeep

Lemuel, Great stuff!

At times when there is a new Language coming every day, Java realigned itself, learnt what its problems are and worked on them, so as to continue to be relevant!

Love Java and love the fact I chose a language that survived 10+ years that I have been doing development

Collapse
 
zerh profile image
Eliezer Herrera • Edited

This lines like this...

 ArrayList<Integer> myList = new ArrayList<Integer>(); 

...are not totally true in "old java", the declaration of the generic object should use the generic args, but... not the instantiation. Should be like this:

ArrayList<Integer> myList = new ArrayList<>();
Collapse
 
drgrib profile image
Chris Redford

Even the version in 2019 Java looks pretty convoluted to me. Now it's looking like Scala, which I'm also not a fan of.

Check out the version of this code in Go:

package main

import "fmt"

func main() {
    a := []int{}
    for i := 1; i <= 10; i++ {
        a = append(a, i)
    }

    for _, num := range a {
        if num%2 == 0 {
            fmt.Println(num)
        }
    }
}

That's a full, executable program that I just wrote off the cuff in 30 seconds while looking at your blog code. I think it has both Java versions beat for striking the right balance of concision and clarity.

Collapse
 
lschultebraucks profile image
Lasse Schultebraucks

Super interesting post Lemuel! Thanks!

Collapse
 
lemuelogbunude profile image
Lemuel Ogbunude

You're welcome!

Collapse
 
akiks profile image
Aki

When did Java introduce "records"?
Will that be a new feature in Java 13?

Collapse
 
lemuelogbunude profile image
Lemuel Ogbunude

Hi Aki, it's not yet a feature in Java. It might be implemented soon, but not sure when. There are talks about it, however:
cr.openjdk.java.net/~briangoetz/am...
dzone.com/articles/april-2019-upda...

Collapse
 
sharqawidev profile image
Abdulrahman Elsharqawi

But how can I learn this new java and master it like the old one? What is the best resources to do that?

Collapse
 
lemuelogbunude profile image
Lemuel Ogbunude

You can get conference talks that give nice updates such as this one: youtube.com/watch?v=J6fegDQPgps&t=1s

That is the Devoxx channel and it's great.

There is a great book manning.com/books/modern-java-in-a... which is aimed at helping you keep up with modern Java features.

Also, I share updates on my channel: youtube.com/channel/UCvoPG-_BHO2Ar...

Collapse
 
ulisses profile image
Ulisses

Java is still a modern programming language, many companies have projects created in Java, nowadays it can be used to develop API rest with Springboot, for example.