Learning path
Java foundations
Start with setup and your first program, then explore objects, flow control and the Java library.
Before you start
No prior Java experience for the first module. Later modules build on the earlier examples.
Open the first guideLearning path · 34 guides
Later lessons include older screenshots and APIs. Match your JDK to your project and check version-specific details as you go.
Official documentation ↗Module 1
Set up and run Java

How to Install Java | Windows JDK Setup
How to install Java on Windows: choose a JDK, check java and javac, fix PATH, and compile a small program to verify the setup.
Read guide →
Java Demo Program | Compile and Run Your First Class
Java demo program: write Chimera.java, compile with javac, run Hello World, and understand main, arguments and access modifiers.
Read guide →
Module 2
Core building blocks

How to Use Classes in Java | Object and Methods
This used to be one of those chapters that I used to dread. And there was no particular reason for that. “How to use classes in Java” more importantly how to be around one. I...
Read guide →
How to Take Input from User in Java
I know why you are here. To learn about Scanner Class Java and how to take input from user in Java. I promise you shall get exactly what you are here for. Thy will...
Read guide →
Understanding Static Class in Java | Java Nested Class
7 Chapters deep, it is high time we understood what Static Class in Java is all about. Why use Java Static Variable? How to make a method or variable static and how to call...
Read guide →
Working with Java Constructors | Example of Constructor in Java
What time is it? It’s Java time! It is time to learn about Java constructors. We will do that with the help of an example of constructor in Java, and see where a Java...
Read guide →
Module 3
Decisions, loops and arrays

Java If Else Statement | Java Switch Case Example
While learning new things, I realized I haven’t covered up a lot of basic stuff. For instance, Java If Else Statement. Now that I think of it, I haven’t touched the rest of the...
Read guide →
Java Loop | For Loop Java | While and Do-While Loop
A Java loop works in a weird way. When I saw one for the first time, I was surprised why would anyone make for loop java to be so bizarre in the first place....
Read guide →
What is an Array | Array Class Java | Array in Java
We are going to learn everything about Arrays here, about Array class Java, how to initialize an array in Java, how to use it in methods, and then some of the popular methods. Working...
Read guide →
Module 4
Objects and inheritance

Java Class Inheritance | Types of Inheritance in Java
Java Class Inheritance is one of the crucial lessons to learn since there are many related concepts. We will see all the types of Inheritance in Java that are there, and wrestle with some...
Read guide →
What is Super Keyword in Java | How to Use Super
This section is created just so you get a hang of what is Super Keyword in Java and how to use Super whilst coding. Super has nothing to do with Superman, so please stop...
Read guide →
This Java Keyword | Using This in Java Constructor and Method
I remember myself to be confused on numerous occasions, trying to understand what this java keyword is all about and how to use ‘this’ in Java. Could be owing to its weird misplacement and...
Read guide →
Abstraction in Java | Abstract Java Example
Abstraction is a concept of hiding stuff from the world so as to not overwhelm people with minute details. Abstraction in Java is fairly similar. Hell, our body is one form of abstraction where...
Read guide →
Java Interface | How to Use Interface in Java
We are gonna learn what Java Interface means and how to use interface in Java in this chapter. I dedicate this whole leaflet to learning everything about interfaces. Interfaces are more or less based...
Read guide →
Java Polymorphism | Polymorphism Java Example
If you look up the dictionary definition of Polymorphism, it is nothing but a condition to exist in different forms. Java Polymorphism is no different. To be available in different forms so as to...
Read guide →
Encapsulation Java | Java Getters and Setters
Encapsulation Java is all about coming up with a nice intact setup to keep your data solidly wrapped inside methods. That’s where Java Getters and Setters come into picture as well. You see nobody...
Read guide →
Module 5
Files and exceptions

How to Read a Text File in Java
Did we not just learn how to take input from user in Java in the last chapter? It would be only befitting to learn how to read a text file in Java almost immediately....
Read guide →
How to Write to a File in Java
So far, we were seeking outputs in the console area. But we can get it in a file as well. Yes, we are going to learn how to write to a file in Java...
Read guide →
Exception Handling in Java | Java Error Types
Sometimes certain events or problems might get triggered during the execution of a program. We need to tackle them with exception handling in Java. If we handle our exceptions then proceed, the proper flow...
Read guide →
Module 6
Strings and collections

Java String Class and String Methods with Examples
I dedicate this chapter to learning everything about Java String Class and String Methods and I will not rest until I have covered every important topic there is under String. Okay, that was a...
Read guide →
StringBuffer Class Java | StringBuilder in Java
This chapter is all about StringBuffer Class Java and its important methods to remember. We will also see what StringBuilder in Java is about and learn how they (all three classes String, StringBuffer and...
Read guide →
String Format Java | Formatting a String | Date Time Format Specifiers
While dealing with string, int, float, long etc. you might require your results to be in a certain format. That’s where String Format Java comes into the picture. Using formatting you could adjust the...
Read guide →
Regex in Java | Regular Expression Java Tutorial
Since you are smart enough, you might have already guessed what Regex in Java is short for. Regular Expressions in Java, correct! It is abbreviated owing to the name of its class which is located...
Read guide →
Java Collections Framework | Iterator, Collection and List – Part 1
JCF is an acronym for Java Collections Framework. It is a framework which is like an architecture or a readymade system taking care of storage and manipulation of a group of objects. A framework is...
Read guide →
Queue in Java | Priority Queue Java | Java Queue FIFO – Part 2
Queue in Java chapter is an immediate successor of Java Collections Framework that we had seen earlier. Make sure you have completely understood List before proceeding to learn about Java Queue FIFO. As per the...
Read guide →
HashSet in Java | LinkedHashSet | SortedSet | TreeSet – Part 3
We are finally at the third and final part of JCF. Here we are going to learn about Set interface, HashSet in Java, LinkedHashSet class, SortedSet Interface and TreeSet class. If you are coming here...
Read guide →
Map Interface in Java | HashMap Implementation in Java
Map interface in Java is not related to Collections and hence we are taking this as a separate topic. Although we are going to see it in a similar style just as we saw...
Read guide →
Java Object API | Understanding Object Class in Java
Java Object API or the Object class in Java is like the Big Daddy of all classes. It is like the Adam of the entire human race. It is at the top of every hierarchy in Java. Every...
Read guide →
Java Anonymous Inner Class | Anonymous Class Java Example
There is this special type of class known as Java Anonymous Inner Class that are often used when people are too tired to think of a class name. Like that’s a thing right? Just...
Read guide →
Module 7
Threads, networking and interfaces

Multithreading in Java | Multithreaded programming – Part 1
Did you know Java supports multithreaded programming? Multithreading in Java is a multitasking scenario where your program could do more than one thing simultaneously. So a multithreaded program would be something that will have...
Read guide →
Synchronization in Java | Inter Thread Communication – Part 2
This leaflet is an immediate successor of multithreading and will try to answer – What is synchronization in Java and take a look at some examples to drive that nail further in. You will also...
Read guide →
Socket Programming in Java | Sending Text Files Between Server and Client
In order to understand socket programming in java and how to send text files between server and client, you need to first comprehend the basics of networking. You see networking is nothing but a...
Read guide →
Java URLconnection | HttpURLConnection Example
We are going to see how to deal with URLs in Java in this chapter. We will also explore the URL class, Java URLConnection Class, HttpURLConnection and also see some methods of Java InetAddress...
Read guide →
Java GUI | AWT Classes in Java | Event Handling
Java GUI is by far one of the most fun chapters in Java. I think you are going to enjoy it too, because hey I love it! The primary reason being as humans we...
Read guide →


































