Listen to this post
Reading Time: 3 minutes

The Basics

Learn Java for fun and profit! Java has been around for so long that this article is nearly meaningless. It’s possible to find resources to learn Java in top abundance. It has been around a long time; on May 23, 1995, Java was born. It’s a mature language with a deep bench of libraries that allow a programmer to create anything they would ever want to build. Java software runs on platforms such as Google’s Android, macOS, Windows, Linux, game consoles, and scientific supercomputers.

Primary Use Cases

I could spend a long time writing many use cases like these. Instead, I’ll list a few real-world use cases I’ve encountered.

  • REST Services powered by the Spring Boot framework
  • Running best of class IDEs like all of the Jetbrains products
  • Creation of robust command-line utilities
  • Management of observability data within distributed systems with OpenTelemetry
  • Building apps on your Android phone, whether it’s a Samsung or a Pixel

The JVM

The Java Virtual Machine (JVM) is a Java feature that sets it apart from other programming platforms. Java’s primary purpose is to Write once, run anywhere, so you can learn one language and apply it to any device.

Back in 1995, the idea of a single platform to rule them all was laughable, and even today it’s a remarkable feat. Installing the JVM is remarkably easy and getting started with it is free.

Installing Java

Any tutorial you pick up to learn java will start with instructions on how to install it. In most cases, instructors will give you the standard instruction to download it from oracle.com and manually install the binary. My recommendation is to skip all of that and install the OpenJDK, which doesn’t come with any Oracle baggage.

If you’re using macOS, I recommend installing jenv to manage various versions of Java. Jenv allows you to add a list of installed JVMs and easily set one of them as active.

Java 8 is still the most common target version, but you may want to learn Java 15 to try something new. Installing the OpenJDK is made easier if you use Homebrew to install Java.

brew install openjdk

Once Java is installed run this command to verify success.

$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Java Fundamentals

I won’t rehash the concepts of Java in this article, but I will summarize some fundamentals you will need to grasp to effectively use Java.

Object Oriented Programming

While Java has functional programming built into it, the foundation of Java is OOP. Learning the fundamentals of OOP will help you learn and use Java effectively.

Language Fundamentals

Keywords, variables, identifiers, data types, literals, operators, arrays, strings, control statements, and other language fundamentals will reinforce your ability to learn and use Java. Memorizing and understanding all of these concepts is like learning the alphabet, colors, days of the week, and other fundamental parts of a spoken language. Without a grasp of these concepts, you’ll be tripping yourself up in your efforts to learn java.

The Command Line

While it might be possible to learn java without learning how to use the command line, I recommend not doing that. The command line is a great place to start learning basic Java concepts. Creating a Spring Boot Console Application that takes inputs and generates outputs will allow you to practice in a focused manner with fewer distractions.

Design Patterns

The Java programming language makes heavy use of design patterns that will speed up your ability to solve problems. Pulling each design pattern that applies to the types of problems you are solving into your tool belt will set you up for success.

Conclusion

Rome wasn’t built in a day. Learning Java is a continuous journey full of twists and turns down its multi-threading features and concurrency frameworks. From having fun with deciding the best web container framework to picking the best Java frameworks to use. You’ll be busy for decades keeping up with the Java Joneses to stay relevant like any other healthy software development ecosystem.

A key takeaway when learning Java is that while choice overload can happen, those choices are what makes Java so popular. Learning Java is like having your own restaurant to cook your food at home. It gives you all the ingredients you need to make the perfect recipe and the room to do it. After all, what programmer wouldn’t want a highly versatile tool like Java in their tool belt?

Have some ☕️, and enjoy your Java learning journey!

Learn Java – Beyond the Basics

image_pdfimage_print

Was this post helpful?

Share this post