New to Java? Some Resources

In this tweet, I was asked if I had a list of resources for developers who are new to Java. I didn’t at the time, but I’ve spent some time researching and here is that list.

I’ve listed content that is both free and paid. It’s not that one type is superior; it’s just to give you plenty of choices. These are the resources that I’ve used and do still use to re-learn Java. So, if you’re new to Java or looking to pick it up again after a break, this blog is for you.

The other super important point is that everyone learns differently; some like reading, some like doing, some like watching, most of us like a bit of a mix of everything. I tend to switch between them depending on what I want to learn about and how I feel. You’re probably similar, so pick an approach that works for you.

Learning Platforms

Let’s start with learning platforms. There are plenty of them to choose from, so you can pick one that works for your learning and budget style.

JetBrains Academy is a reasonably new learning platform that I’ve been using to skill back up on Java. I’ve used it in conjunction with other learning materials. I like the mix of theory with practice tasks. Of course, the slick integration with IntelliJ IDEA is a bonus too.

I’ve also used Udemy in my Java learning travels. There is a wealth of content available here, and you can sample most of it before you buy.

Finally, I’ve played around with codewars. This is a nice gentle introduction to katas (more on them soon), irrespective of where you are on your coding journey. It’s less structured than either JetBrains Academy or Udemy and can provide some light coding respite when the mood takes you.

Communities

The Java community is a rich, vibrant and welcoming place. This is played out in the communities that have sprung up around it.

The Virtual JUG is what it sounds like; a virtual Java User Group that hosts talks and shares knowledge. They have a Slack and Meetup space, so you can hear great speakers, speak yourself and learn from your peers.

Since I’m based in the UK I also want to give a shout out to the London Java Community and the Manchester Java Community. They are both great resources of information and supportive communities. I fully expect that this is mirrored in other Java User Groups worldwide, so I recommend you find your nearest one (or set one up(!)) and get involved. Talking of getting involved, creating content is an excellent way to do that.

The Java Specialists is another active group run by @heinzkabutz. Heinz also has a newsletter that I recommend you take a look at.

The Code Ranch is a very friendly place for newcomers to Java where you can post questions, learn from others and try out coding questions. The forum is also really active (oh, and did I mention that everyone here is super lovely?).

Code Katas

I am a relative newcomer to code katas, but I really like them as a way of learning. They are self-contained mini-puzzles that you can solve at your leisure.

@TheDonRaab does a great job of keeping these updated for Eclipse Collections: https://github.com/eclipse/eclipse-collections-kata

@CGuntur has also created these Java Katas for you with really nice instructions and updates: https://github.com/c-guntur/java-katas

I’ve not started these yet, but I like the look of them because the tests are right there to look at.

Specific Java Resources (including Frameworks)

This is a bit of a catch-all section, but there are a few resources that I’ve come across that are amazingly useful; they are listed here.

This course from @techgirl1908 was one of the very first resources I used on my journey to familiarise myself with the last 20 years of Java. I found it to be well-paced, gentle and incredibly useful.

@marcobehler has created a lot of content around Java, and specifically, Spring. This blog, and this Spring course, it is a bit like an onion. It starts with life before Spring and builds up the complexities so that you feel like a wizard when using Spring (and subsequently Spring Boot) and understand how the magic is being done and why. I feel like there’s a spring onion pun there, but I’ll move swiftly on.

There is a wealth of Java information on the Baeldung site. I don’t have one specific blog to point to, but invariably when I’ve Googled Java something there is a blog on this site that explains how to do it. It always amazes me just how rich this content is in terms of quantity and quality (many authors contribute to it).

One more thing I do want to mention is the official Oracle documentation for Java. I say this because you don’t have to store the Java language in your head. There is no shame in looking stuff up (another reason why technical interviews are so broken). Spend your time on the artistic side of learning to code, not remembering stuff that is one Google search away. Sure, you’ll learn more in time, but it doesn’t need to be your priority when you are starting your Java journey.

Of course, there are plenty of dedicated Java blogs out there, which you can find with a quick Google, but I want to keep this list of resources specifically targeted at content that newcomers might find helpful and that I’ve used.

Books

I like books; arguably, I like them more than videos. As with all other resources I’ve listed here, there is no shortage of them. These are the ones that I specifically have found helpful.

Head First Java by Kathy Sierra and Bert Bates. Yes, this book is old on the scale of Java, but it’s still very, very good and will probably appeal to your brain’s way of learning. I started with this book, and I didn’t regret it.

97 Things Every Java Programmer Should Know. Am I including this because I work with @trisha_gee, no, I am including this because I got a lot of value from it. I liked the vast range of topics that I could dip in and out of it very quickly because all the content is standalone. Many very experienced Java professionals contributed to this, so in my mind, they are worth listening to!

Effective Java by Joshua Bloch this isn’t the book that you start with, but it’s a book with a relatively low barrier to entry, and a book that I got a lot of value from (and probably need to re-read now I have more knowledge).

Head First Design Patterns 2nd Edition. This book is so fresh off the printing line that the ink is likely still wet. I’m going to come clean and say that I don’t own this yet, but I plan to own it very soon. I do own the first edition, and it was excellent. I fully expect the second edition to be just as good, if not better. Design pattern knowledge and understanding will serve you well, no matter what your coding goals are.

Java Certification

A note about Java Oracle Certification: this tends to be one of those subjects that can polarise opinion. I think certification is very valuable for a deep understanding of the Java language, and it will serve you well if you want to study and obtain it. I don’t think you need to be certified as such, and I suspect that on the job knowledge of Java will provide you with an equally rich and diverse experience of the language, albeit from a different angle. It’s entirely up to you, but here are my recommendations for resources if you want to pursue Java certification.

There are excellent books available from Jeanne Boyarsky and Scott Selikoff. I haven’t taken the exam, but I have found the books very useful and the examples informative.

My colleague Mala Gupta is also a passionate advocate of Java Certifications and her book for Java SE 11 is in preview so that you can get your eyes on it already!

Goals, Learning Styles and Time

Irrespective of if you’re new to coding, new to Java specifically, or took a break from Java, this is a list of resources that will help you get up and running quickly. I suggest you find the ones that work for you and build your list. Invariably what works for one person might not work for the next, so feel free to explore the wealth of content out there. Your learning style will also play a part, as will the amount of time you have available.

Whatever you do, enjoy the journey and remember what your goals are. Never lose sight of the why; that’s what will get you to where you want to be.

LTS Version or Latest Version of Java?

We, the Java Developer Advocates at JetBrains, are building a Spring Boot application. Right at the start of the process (which was yesterday on publish date) we kicked off the New Project wizard and selected Spring Initializr. Everything was fine until that point, we (Trisha, Dalia and myself) were having a nice chat and all in agreement. That was when we got to this screen:
Spring Initializer Settings
We gave it a name, set the location, and then had a quick debate about Maven or Gradle. If you’re interested we chose Maven for this project but will choose Gradle for a different component because we like a bit of variation. That wasn’t the contentious part, that was merely a warm-up exercise as it turned out.

We got down to Project SDK and Java. And this is where I felt like I’d been ported to an episode of Mortal Kombat with Trisha and Dalia playing leading roles. BTW, in case you were wondering (because I was), the Java field is the Language Level. I opted to extract the (mostly) full conversation here because I think it’s really useful to show this transparency of a healthy debate. Also, now I’m listening to this back to extract the transcript, Dalia totally started it. Oh, and then there was this, by way of escalation.

Dalia: Alright, hold on. The version of Java we’re using, do we want to use 11?
Helen: (yes I got this one word in) It’s the latest LTS isn’t it?
Trisha: It is, but 16 is so nice, but 16 is also challenging because 16 it hides the internals of the JDK by default so if you have any other JVM language like Kotlin it doesn’t work that well on 16. Now, since we’re using Spring Boot, Spring is always a little bit behind anyway so Spring supports Java 15, I don’t think it supports Java 16 but if we use Java 16 we can use Records, which is fun. I want to go with 16 and then see what breaks.
Dalia: My opinion is 11 because if you’re in an enterprise scenario, you will not be using 16, you’ll be using 11 because you want to make sure you’re not going to have to upgrade every 6 months.
Trisha: I agree with that. What I would like to do is I would like to showcase what you’re missing, but, here’s the other thing, so we might not even use that many features from Java 12 through 16, what we might want to do though is if we use anything that’s 12 through 16 we’ll just “if you’re using Java 11 this is how you do it”, like Records, because Records can be converted to data classes.
Dalia: When is 17 coming out?
Trisha: September
Dalia: Okay do we feel like we’ll want to upgrade to 17 when it comes out because that’s the main argument for me because then we can upgrade to 17 and that might be around the time we showcase this.
Trisha: So, I would like to show 16 to really help to pull people in the direction of 17. 16 has Records as a standard feature, not a preview feature which will be really helpful for small services.
Dalia: The only thing I’m saying is that if we are recommending “here’s how you start a new service”, then best practice is not to start with a short term release.
Trisha: I know what you’re saying, I think given 17 is coming out in September I think we should be poking people in that direction. We’re talking about new services and if you’re trying to get people to do new services with 11 it’s going to be forever before anyone gets anywhere. So if we go with 16 then we can say “you should be doing this on 17” when it comes out and it’s a full Java 17 application.
Dalia: I agree to disagree, I would have done 11 but I think you have a fair point too.
Trisha: We can revisit this decision if it looks like there’s anything that’s going to be show-stopping. So yes, lots of decisions on the first page!
Dalia: Yes! I think this is a really good topic to create content from how we made these decisions.

And, that is how this blog came to be! Then, we moved onto this page:

Spring Boot Options

And the conversation continued. We discussed which version of Spring we should use given we’ve selected Java 16. That involved some Googling, and we landed on the snapshot release which of course continued to make Dalia pretty nervous (understandably!).

We had a discussion around what our objectives were in terms of who we should be providing feedback for and why. We agreed that sending feedback on all bugs and problems to all software vendors (of course including JetBrains) was paramount, so we try things out and find issues before you all do. We went on to discuss the fact that we didn’t want the tutorial to be immediately out of date and that was another reason to forge ahead with Java 16.

The conversation concluded like this:
Trisha: I’m going to propose we go my way, but, as soon as we lose more than half an hour to a stupid bug then we roll back one thing at a time.
Dalia: Yes! Yes!

Finally, I managed to get a word in and asked how easy it would be to change the version of Spring Boot after we’ve made these selections. Turns out, that’s very easy (just like it is for the SDK).

We all wanted to share this with you because it was a healthy and fun debate. These are great discussions to have and are critical for new projects. Yes, IntelliJ IDEA makes changing this stuff easy after the event, but that doesn’t mean you should just forge ahead without understanding why you want to go down that path.

At the time of writing the poll was very evenly split. My personal view is that this is because both Trisha and Dalia are excellent ambassadors for the Java community, and they were both advocating for what they believed to be the best option for the content we all want to create.