Java foundations

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 guide

Learning 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

  1. How to Install Java | Windows JDK Setup
  2. Java Demo Program | Compile and Run Your First Class

Module 2

Core building blocks

  1. How to Use Classes in Java | Object and Methods
  2. How to Take Input from User in Java
  3. Understanding Static Class in Java | Java Nested Class
  4. Working with Java Constructors | Example of Constructor in Java

Module 3

Decisions, loops and arrays

  1. Java If Else Statement | Java Switch Case Example
  2. Java Loop | For Loop Java | While and Do-While Loop
  3. What is an Array | Array Class Java | Array in Java

Module 4

Objects and inheritance

  1. Java Class Inheritance | Types of Inheritance in Java
  2. What is Super Keyword in Java | How to Use Super
  3. This Java Keyword | Using This in Java Constructor and Method
  4. Abstraction in Java | Abstract Java Example
  5. Java Interface | How to Use Interface in Java
  6. Java Polymorphism | Polymorphism Java Example
  7. Encapsulation Java | Java Getters and Setters

Module 5

Files and exceptions

  1. How to Read a Text File in Java
  2. How to Write to a File in Java
  3. Exception Handling in Java | Java Error Types

Module 6

Strings and collections

  1. Java String Class and String Methods with Examples
  2. StringBuffer Class Java | StringBuilder in Java
  3. String Format Java | Formatting a String | Date Time Format Specifiers
  4. Regex in Java | Regular Expression Java Tutorial
  5. Java Collections Framework | Iterator, Collection and List – Part 1
  6. Queue in Java | Priority Queue Java | Java Queue FIFO – Part 2
  7. HashSet in Java | LinkedHashSet | SortedSet | TreeSet – Part 3
  8. Map Interface in Java | HashMap Implementation in Java
  9. Java Object API | Understanding Object Class in Java
  10. Java Anonymous Inner Class | Anonymous Class Java Example

Module 7

Threads, networking and interfaces

  1. Multithreading in Java | Multithreaded programming – Part 1
  2. Synchronization in Java | Inter Thread Communication – Part 2
  3. Socket Programming in Java | Sending Text Files Between Server and Client
  4. Java URLconnection | HttpURLConnection Example
  5. Java GUI | AWT Classes in Java | Event Handling

Keep exploring

Looking for something else?