- You are an engineering undergrad in a four-year course.
- Your major is computer science & engineering.
- You are inclined towards programming.
- You are thinking about a career in programming.
- You have heard about Java from your friends/peers and want to learn it.
- 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?".
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:
- Which is the "best" programming language?
- Is the "X" programming language better than the "Y" programming language? Why?
- Where should I start from?
- What all do I need to learn to land a job?
- I watched this YouTube video of this generic YouTuber person, will this suffice?
- Do I need to purchase an expensive course for this?
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
- Data Types (The 8 Java Primitive Types)
- Variables (The
- Type Conversion & Casting
- Automatic Type Promotion
- 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
- Varargs [Variable Length Arguments]
- Scanner Class, BufferedReader Class
- 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)
- 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)
staticmembers in a class)
finalkeyword (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]
superkeyword (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,
throwskeyword, custom exceptions)
- Multithreaded Programming (Java Thread Model, Main Thread, Creating a Thread,
Runnableinterface, 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
- 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.
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
- Project Euler
- Sphere Online Judge SPOJ
- 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
- Guide to Competitive Programming Learning and Improving Algorithms Through Contests
- Java Coding Problems
- 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!