What you should learn to become a Master Yoda in Java

John Selawsky - Feb 7 '19 - - Dev Community

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

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .