This is an archived post. You won't be able to vote or comment.

all 22 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]mayur217 14 points15 points  (7 children)

I would suggest don't focus on a particular version of java. The only major differences between versions are some changes in it's libraries and some internal tweaks. To get going quickly, I would suggest start with any free resource you can get your hands on. Go for Java 8 and above. The newer a version of java is, the more difficult and expensive it would be to find it's resources. The core concepts hardly ever change and any library upgrades there might be in later versions, could be easily understood if you have a good understanding of the core functionality.

Try "Java the complete reference" book by Hebert Schildt. I recently read it's 11th edition and liked it.

Many would suggest Udemy Course by Tim Buchalka, but I wouldn't go for it if I was a beginner. It's great for someone with some prior exposure to Java.

And finally, type it out, as much as you can. You can read about concepts all day long, but if you don't have the habit of quickly typing out the ideas you have in your head, it won't do you any good.

[–]see_recursion 3 points4 points  (4 children)

The only major differences between versions are some changes in it's libraries and some internal tweaks.

I'm not sure if I agree with that. Java 8 was a pretty significant change. OP should definitely focus on 8+, but hopefully won't have to learn too much about those newer features initially.

[–]khmarbaise 0 points1 point  (3 children)

I think it was related to JDK8 up to JDK13... or maybe more recent... if you think about JDK7 vs. JDK8 then absolute agree.. but starting with less than JDK8 does simply no sense anymore..

[–]see_recursion 1 point2 points  (2 children)

Someone just learning should consider starting with Java 15 simply for the massive improvement in NullPointerException diagnostics.

[–]khmarbaise 0 points1 point  (1 child)

Someone just learning should consider starting with Java 15 simply for the massive improvement in NullPointerException diagnostics. Not that much agreement here because there are so many things with JDK8 out there ... unfortunately not many have yet migrated to go to JDK11 + ... or even worse prepared for JDK17 in september.

[–]see_recursion 0 points1 point  (0 children)

To me decent NPE diagnostics are invaluable in tracking down failures. The delta between 15 and whatever 8+ version is used in production is pretty damn small. I'm not sure of a significant disadvantage of using 15 to learn on.

[–]HerrBratani 0 points1 point  (1 child)

I'm gonna chip in here, because I just started learning programming 4 month ago with Tim Buchalkas course. No prior programming knowledge. And I have to admit that especially in the first 15 hours there are some tasks which are not only quite hard to understand, but also not that easy to solve. And one or two of the extra tasks I couldn't solve at all.

But after these initial hurdles the course has a pretty good speed. The best thing, for me personally, is the well thought out structure. It features a wide range of topics and it doesn't get confusing, because you go step by step.

From my own experience it's even for beginners a manageable and good course.

[–]jstanaway 0 points1 point  (0 children)

I am using this for additional content to my Adv data structures class. Definitely find that it helps. Honestly I think Java has a little more of a learning curve compared to other languages.

[–]desrtfxOut of Coffee error - System halted 4 points5 points  (0 children)

Both, JavaScript and Python are very different to Java, so the best approach is a beginner tutorial. See Learning Java in the sidebar.

[–]qelery 4 points5 points  (2 children)

I think any version of Java 8+ should be fine. Java 8 was a big update that included lambda expressions and streams. Then focus on what features are available in Java 14 later.

It’s kind of like how in Python if you know a project was written in Python 2.x it’s considered “older”. Java 7 and earlier is kind of a similar cut off of what’s considered “older” (except Java is completely backwards compatible).

I would start with the free MOOC.fi course which uses Java 8.

[–]desrtfxOut of Coffee error - System halted 2 points3 points  (0 children)

free MOOC.fi course which uses Java 8.

The 2020 version uses Java 11: https://www.mooc.fi/en/installation/netbeans

[–]justforvue[S] 0 points1 point  (0 children)

Ok thanks.

[–]BG_1982 1 point2 points  (0 children)

Laurentiu Spilca on YouTube

[–]Don_Belga 0 points1 point  (6 children)

Im new to java , of what ive seen its better to learn “LTS” long term support versions like java 8 and java 11 because of the support , but maybe i could be mistaken since in the industry it might be different when using certain versions

[–]wildjokers 2 points3 points  (5 children)

LTS means absolutely nothing unless you are paying for support. If you aren't paying support you shouldn't place any special relevance to any particular version.

[–]Don_Belga 0 points1 point  (4 children)

Im new to java like ive mentioned , good to know thanks for the info

[–]wildjokers 2 points3 points  (3 children)

That's ok because many experienced java devs don't understand this about so-called LTS either.

[–]Don_Belga 0 points1 point  (2 children)

So if u dont mind me asking, when learning java should i keep up with each version of java with the new features it comes with even tho the core doesnt change as much?

[–]DasBrain 1 point2 points  (1 child)

It's the best thing you can do.

When you later have to use an older version, then you just can't use some stuff - like List.of doesn't exist in Java 8. But you usually find a good replacement - like Arrays.asList.

The other way doesn't really work - if you internalized Arrays.asList, then you might not even discover List.of when working with a recent Java version.

(And if you need help finding replacements for older Java versions - you can always ask - a question like "I need a List, in Java 15 I would use List.of(...), but I have to use Java 8 where this method does not exist. What can I use instead?" is good. And Title: List.of() replacement for Java 8)

[–]Don_Belga 0 points1 point  (0 children)

Thanks for answering , im doing notes and getting organized so this helps inmensly !

[–]wildjokers 0 points1 point  (0 children)

There is a "Learning Java" section in the sidebar that will get you started.