A Simple Roadmap for Java Beginners in 2021

dbc2201

dbc2201

Posted on May 13, 2021

A Simple Roadmap for Java Beginners in 2021

This post is for you if you can answer "yes" to all/most of the questions below:

  1. You are an engineering undergrad in a four-year course.
  2. Your major is computer science & engineering.
  3. You are inclined towards programming.
  4. You are thinking about a career in programming.
  5. You have heard about Java from your friends/peers and want to learn it.
  6. You have some form of introduction to the Java programming language but you want to further increase your knowledge.

It is easy to get overwhelmed these days by looking at what other people are doing in the programming field. Considering the variety of low-code/no-code options available out there to "create" software. Being a teacher for about 6-7 years, I've had my fair share of students coming up to me and asking "What should we learn?".

Photo by Edmond Dantès from Pexels

To which, I mostly answer "Well, start with a programming language, and learn it well." Little did I know in the beginning, that this statement mostly does more harm than good to a student who is confused about their career paths, or what choice do they make given the opportunities that they have currently been exposed to.

They (students) then start asking me a plethora of questions that are largely subjective and depend on the student itself. Sometimes, it is also a matter of taking initiative, and/or deciding on a choice and seeing it through, which I have observed is a lacking ingredient in the younger generation these days. The follow-up questions that I then receive are somewhat like this:

  1. Which is the "best" programming language?
  2. Is the "X" programming language better than the "Y" programming language? Why?
  3. Where should I start from?
  4. What all do I need to learn to land a job?
  5. I watched this YouTube video of this generic YouTuber person, will this suffice?
  6. Do I need to purchase an expensive course for this?

Alt Text

It is completely okay if you have had the same question in your mind for some time, I had the same questions myself when I started programming seriously.

As I have experienced, if you're willing to learn Java (since this post was originally about Java) in 2021, your journey from a "beginner" to a "not-a-beginner-anymore" stage will consist of largely 4 stages.

Before we begin exploring things, I would just like to make a disclaimer that a lot of people will tell you otherwise, they'll often come up to you and say "Oh, it's so easy, just do "this", watch this "video", enrol in this course..." which is complete bollocks. Learning a programming language is exactly like learning a new spoken language, your brain needs to remove or at least ignore your previous bias and get used to thinking in terms of the new language. For that, you need to put in a constant effort and hard work. If it were actually that easy as some people say, everyone you know would have been a rockstar developer and we would have been living in a programming utopia, free of problems, (maybe riddled with bugs, lol).

Just remember, what EVERY programming language does is tell a computer what to do!. In the end, everything gets translated for 1s and 0s for your CPU so it does not matter what language you use to "code" your next big app or website! Languages are for the efficiency and benefit of developers, not the computers.

To start I would recommend this book : Java: A Beginner's Guide by Herbert Schildt

1. Syntax and Semantics:

  • Data Types (The 8 Java Primitive Types)
  • Variables (The var keyword)
  • Type Conversion & Casting
  • Automatic Type Promotion
  • Arrays
  • Operators in Java (Arithmetic, Bitwise, Relational, Boolean Logical, Assignment, ? Operator, Operator Precedence)
  • Control Statements in Java (If, If-Else, If-Else-If, Switch (new and old))
  • Iteration Statements (While, Do-While, For, For-Each, Nested Loops) [continue, break and labels]
  • Using Command-Line Arguments in a Java Program
  • The String class
  • Varargs [Variable Length Arguments]
  • Scanner Class, BufferedReader Class

2. Object-Oriented Programming:

  • Types of Program Units in Java [4 - Class, Abstract Class, Interface, Enum + 1 Record]
  • Declaring and Using Objects in Methods
  • Reference Types and Values
  • Methods (method signature, method types)
  • Constructors
  • The this keyword
  • Overloading Methods
  • Overloading Constructors
  • Using Objects (Reference Types) as method parameters and arguments
  • Using Objects (Reference Types) as return types of methods
  • Recursion in Java (Call Stack, Tail-Recursion, Head-Recursion)
  • The static keyword (creating static members in a class)
  • The final keyword (with a class, with a method, with a member variable of a class)
  • Nested Classes and Inner Classes
  • Inheritance in Java (Super & subclasses) [Hierarchies in programs]
  • The super keyword (calling Super class' members from the subclass)
  • Types of Hierarchies in Java [Simple, Multi-level, Multiple, Hybrid]
  • Method Overriding
  • Abstract Classes and Abstract Members
  • Interfacing (defining an interface, implementing an interface, nested interfaces, members in an interface, private OR static OR default methods)
  • Packages in a Java program (CLASSPATH, importing)
  • Exception Handling (exception types, caught and uncaught exceptions, try-catch, try-finally, try-catch-finally, multiple catch blocks, nested try statements, throw and throws keyword, custom exceptions)
  • Multithreaded Programming (Java Thread Model, Main Thread, Creating a Thread, Thread class and Runnable interface, multiple threads, sleep() method, thread priorities, using lambda to create a thread, using anonymous class to create a thread)
  • Enumeration Classes in Java
  • Type Wrappers (Wrapper Classes in Java)
  • Boxing and Unboxing
  • Annotations in Java
  • Generics in Java (Bounded Types, Wildcard Types, Bounded Wildcards, generic methods, generic constructors, generics with static methods, generic classes, generic interfaces, overloading and overriding in generic methods, Type Erasure, generic arrays)
  • Lambda Expression (functional interfaces, lambda as arguments, method references)
  • Stream API (types of methods, common methods from the API)
  • String Handling (String class constructors, string length, string operations, character extraction, string comparison, searching strings, modifying strings, StringBuilder, StringBuffer)
  • Classes in the java.lang package

3. Data Structures & Algorithms:

  • Collections Framework in Java (collection interfaces - List, Set, Deque, collection classes, - ArrayList, LinkedList, HashSet, TreeSet, PriorityQueue, ArrayDeque, using iterators on collections, Iterator class, for-each loop, streams, Custom Collections Classes, Map Interfaces and Map Classes, Vector, Stack, Dictionary, Hashtable, Properties)
  • Misc - StringTokenizer, BitSet, Optional, LocalDate, LocalTime, LocalDateTime, GregorianCalendar, TimeZone, Locale, Random, Timer, Currency, NumberFormat, StringFormat.

4. Problem Solving:

When you have some decent knowledge of the topics written above, you can try your hands on some problem solving (a.k.a Competitive Programming, CP). Some recommended websites are

  1. TopCoder
  2. CodeForces
  3. CoderByte
  4. Project Euler
  5. HackerRank
  6. CodeChef
  7. Exercism
  8. CodeWars
  9. LeetCode
  10. Sphere Online Judge SPOJ
  11. CodingGame Choose whichever one you like all of them are for the same thing, to help you build up your knowledge of the language. There are some nice books as well which help you learn the basics of Competitive Programming like
  12. Guide to Competitive Programming Learning and Improving Algorithms Through Contests
  13. Java Coding Problems
  14. The The Complete Coding Interview Guide in Java

The intentional order of the sections is 1-2-3-4, although you could do section 4 as per your comfort, you can very well start section 4 after section 2 as well. PLEASE NOTE that this is not the complete list, there is still a lot more to cover, this is just to get you comfortable enough that you could try anything with Java after this. Hope this blog post will help at least some of you!

💖 💪 🙅 🚩
dbc2201
dbc2201

Posted on May 13, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related