loading...

What you should learn to become a Master Yoda in Java

selawsky profile image John Selawsky ・7 min read

So you decided to be a Java Jedi… There’s a long road ahead of you.

Jedi

The road starts by writing code every day, practicing, and learning a little bit of theory. The first big step is to practice Java Core. This step is a key and consists of several levels (see below). The second step is learning different technologies every modern software developer should know. The final step depends on what particular Java Padavan wants to do. “Train yourself to let go everything you fear to lose” — Yoda said.

Step one: Java Core+

Level zero: Java Syntax

This is like learning your “ABC’s” for Java. When you were a kid, learning how to write you, you gain an understanding of letters and words and how to use them together. The same story with a programming language. Don’t worry about this level. You absorb Java Syntax step by step during practice.

Themes:

  • What is an Object
  • What is a Class
  • What is a method
  • primitive types
  • type String
  • Basic operators
  • Java if-else statement
  • Loop statements (for, while)
  • Arrays

level 1: OOP

OOP is not the most difficult topic in the world, but it is extremely important. It is important both to read about and to practice OOP principles.

Class inheritance, interface implementation, abstraction of data and behavior, encapsulation of data and class implementation, polymorphism and virtual methods are all key topics. Practice the concepts and read books (for example, Cay Horstmann, Gary Cornell Core Java, Object-Oriented Analysis and Design by McLaughlin).

level 2: Java Collections

You may call a group of individual objects represented as a single unit a Collection. Java provides the Collection Framework which defines several classes and interfaces to represent a group of objects as a single unit.

You will learn the data structures via Java Collections interface (java.util.Collection) and Map interface (java.util.Map). You may call them the two main “roots” interfaces of Java collection classes.

level 3: Java exceptions

An exception (or exceptional event) is an abnormal situation, that arises during the execution of a program. This mechanism greatly simplifies bug catching in programs. All exception classes are subtypes of the java.lang.Exception class and every Java student should know it very well.

Level 4: Input/Output streams

Java performs Input and Output operations via Streams. You can imagine a stream like a continuous flow of data. This topic can be problematic for beginners. A bonus for learning this topic that you discover the real hidden meaning of System.out.println().

java_java_java

Level 5: algorithms and puzzles

What about algorithms? There is often a debate of the value of learning how to code sorting or searching algorithms. During your study of the collections and data structures you’ll find out about sorting/searching methods. Java, and most languages, have libraries with implementations of all known algorithms for sorting and searching. That means they have already been written for you to use. So should you (or shouldn’t) worry about learning how to code them?

The answer I prefer is — you should learn it in order to know how to better think like a software engineer. It is very useful to create your own implementations of algorithms, as well as to form an understanding of their complexity. Especially for people who have studied math only in high school.

All the popular sorting and searching algorithms are described and solved on the network many times. So you don’t need a validator for verification. Choose any course, for example, Princeton University or CS50 or a Youtube video and try to code your very own version.

What about puzzles or non-standard type of Java tasks? They are extremely helpful for any coder because you are taught how to solve difficult and fuzzy problems.

Level 6: Java Multithreading

Everyone after level zero can write a program that displays “Hello World”, but what if you should do it using the Java Thread API, so that the famous phrase is printed from an additional thread? And what if the program should print “Hello world” five times, from five different threads, without alternating strings. Multithreading is difficult for even the most simple tasks and is an advanced Java topic.

Level 7: Java Patterns

On this level you’ll know you can to write programs a little bit. Are they good enough? Do they look like professional code? To write code like a pro, you must learn design patterns first. They represent the best practices used by experienced software developers. Design patterns solve many general problems software developers faced during development. These patterns were chosen as a result of trial and error of numerous software developers over a substantial period of time.

Level 8: Unit testing

An important skill for any programmer that is writing unit tests to their own code. When you figure out how to write tests, you should apply this as a habit to all your projects. Unit tests are much more useful than doing checks using console output. Unit tests are also the first thing companies typically trust new developers to write.

Level 9: lambdas

Support for lambda expressions appeared in Java 8, but not all programmers have adopted them yet. However, today the concept of “tasks for Java Junior” includes manipulations with lambda expressions, so I recommend learning them as well.

Level 10: Serialization in JSON, RMI, HttpUrlConnection, socket

These topics are for more intermediate and advanced Java developers. They require deeper knowledge, and act as a kind of bridge to their own projects, internships, and work.

Where to find practical tasks for levels 0–10?

practical_task
CodeGym — it’s a Java Core course with more than 1000 coding tasks with validations.

codegym

w3resource — a good and very famous site for web developers.

GeeksForGeeks (especially algorithms and puzzles) — very nice resource with many tasks and different courses.

geeksforgeeks

Step 2: add-ons

Java developer uses not only Java, but many different technologies. Some of them became a standard for everyone who are in IT. However, it doesn’t mean you must to know these technologies as deeps as Java Core. Learn them a bit, some of them you’ll find out better during your job or internship.

Git. It’s the most widely used version-control system for tracking changes in computer files and coordinating work on those files among multiple people. So if you want to be a professional programmer, understanding Git is a requirement. Almost every software company uses it.

Learn it here: Learn it here: Learn Git Branching or here: what is Git

JavaScript. This cross-platform, object-oriented scripting language is found in ever web browser. JavaScript can be connected to the objects of its environment to provide programmatic control over them. So JavaScript is everywhere and even if you don’t want to work as a frontend developer the word ‘JavaScript’ is a good add-on for your CV.

Learn it here: w3resource or here: codecademy

SQL. Defined by Wikipedia as “Structured Query Language is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS).” It’s pretty easy to learn it on the beginner level. Almost every programmer has used SQL at some point.

SQL

Learn it here: SQLBolt or here w3schools

Step 3: Became a master

Most of Java developers work in two areas, mobile tech or enterprise projects. After you gain the core knowledge in the first 2 steps, we split into 2 different branches. We will not dwell on them in detail, but each branch deserves a special article. So, briefly:

Mobile Technologies

Java knowledge opens up the world of Android development for you. A great place to start to learning Android programming: Google Developers Training

Enterprise technologies

This consists of a bunch of technologies that are difficult to learn by yourself. It is much better to find courses or an internship. It is beneficial to learn about Spring, the most popular Java Framework, and Hibernate, an object-relational mapping tool, and other related technologies, and they are taught in this free Udemy course.

If you choose the Java developer’s path — May the force be with you!

First published on GitConnected

Posted on by:

selawsky profile

John Selawsky

@selawsky

A senior Java developer and Java tutor. In Java We Trust.

Discussion

pic
Editor guide
 

Hi John,

Great article. I am currently at a stage where I am comfortable with Collections and Exceptions. However, I have not experimented with any JAVA frameworks. I come from Python background and as a result I have worked for good amount of time on Django. Now, I understand that Spring is the equivalent of Django in Java environment, but whenever I research on how to get started with Spring, I find servlets as a requirement. My understanding is that servlets is the old way to do web related programming and Spring happens to be built on top of servlets.

So, my question is, to be an able web programmer( mostly for the backend ) in 2019, is it recommended to start with Spring and other related technologies like - Hibernate, Spring boot etc. or should I take a course of Servlets and related tech - JPA etc before. At work we use Olingo for creating REST services and turns out Olingo has Spring compatibility. So considering all these, is it wise to devote time to learn servlets etc or Spring would suffice ?

Regards,
Dev

 

1) Go for Spring Boot and then cycle through every Spring related technology.
2) Learn some microframeworks (the equivalent of Flask) I have a post about some of my favorites here

 

Hi,

It is not the best idea to read pure servlets specs, I presume.

However, you really need to be familiar with this technology, because the Spring (MVC) uses servlets beneath the hood and the same story with databases. It is difficult to find a project that doesn't use databases.

The simplest option is a relational database and working with it through JDBC. Every ORM framework use this, but it doesn’t mean you need to write your own templates code, close connections, write finally blocks (and catch exceptions in them again). You can google a request such as "top java frameworks 2019" or something like that.

If we mean Java not only as a language for the backend of apps, but also as the skills that developer needs, let’s highlight the following directions: architecture (monolith, SOA, microservices), application build (Maven, Gradle, ...) and deployment. It depends on architecture. We can use Tomcat for deploying, writing Compose files for Docker and a few dozen variations of working with the database (something from ORM: Hibernate, MyBatis, Spring Data JPA, ...), design and work with API (REST, gRPC), security (Spring Security) testing (JUnit, TestNG) - unit & integration.

So… What is the best for you? Some people like watching videos on youtube, the others prefer to read reference documentation. I am an apologist of practice. As you can see from the list of technologies above, Spring ecosystem offers solutions in many ways, so I would recommend starting with Spring.

I highly recommend this resource: spring.io/guides/. There you can find some small examples of code with explanations. So, download the template project from github, follow the instructions and explanations, check that output is the same as in the reference implementation. Unfortunately, I can say nothing of "Spring is the equivalent of Django", because I am not a Python guy. To sum up, you need to understand the basics, and be able to use modern technologies that are built on these basics. So, don’t waste your time just reading specifications.

 

Hi,

Check out this Spring course: youtube.com/playlist?list=PLqq-6Pq...

I highly recommend it, it goes straight to the point.

 

You might want to check out Grails framework. Easy to get started and uses Spring under the hood.

 

May the force and Lord be with me!

Hi John!
Really a great article, the way you have segregated the topics it's very helpful. Currently I am working as a Java developer and I am not expert in same for now. I am planning to move to Python but since I have already invested 4 years in Java so I am getting confused.
These days I am learning from scratch from GeeksforGeeks. Please suggest from where and how I should get all my Java concepts cleared so I can crack an interview.
Thanks!
Shivika

 

Hi John,

Glad I found your post, a lot of good information here. I started learning Java a month ago, been doing Tim Buchalka's Java Masterclass on Udemy. As far as exercises goes there's a ton. I found codegym also, but price wise a little out of my league at the moment but seemed like an incredible resource for learning. As someone that might be more interested in visual/android than enterprise, should I still learn some spring, or after learning the core jump straight into android (I also really am interested in JavaFX)?

 

Hi John, this is a very good write-up for every beginner. I am a student and have once learned Java using the Head First series and later dropped it. Unfortunately for me I never enjoyed the power of Java.
Today, I am back learning through Java The Complete Reference.
I will like you to help me point out some open source projects or project ideas I can use to deepen my skills.
Thank you very much for this.
Regards.

 

May the force be with us!
Very nice article!

 

Thanks for the resources!