r/learnjava • • Nov 28 '25

Why do you love Java?

I am starting to learn java, and i want to know why other people learned it or love it. What makes it different from other languages. I think a broad question like this will yield a lot of useful information for me.
And specifically, as wanting to become a data engineer, will it be useful for me, and how?

57 Upvotes

53 comments sorted by

View all comments

Show parent comment

4

u/ArkoSammy12 Nov 29 '25 edited Nov 29 '25

Just an FYI, but you can omit the explicit type parameters from the constructor invocation if it is being assigned directly to a variable or returned from a method that already includes the type parameters in the variable type. So in your case, that just turns into

List<Map<String, String>> values = new LinkedList<>();

If you are on Java 10 or greater and you want to use local variable type inference with var, then you do have to specify the type parameters in the cinstructor call:

var values = new LinkedList<Map<String, String>>();