Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Programming in Java — Free Notes & Tutorial

Free Programming in Java course on SikshaSarovar (Siksha Sarovar) — 18 structured lessons with notes, examples and a built-in online compiler. 100% free, no sign-up required.

This Programming in Java course is part of Siksha Sarovar and is 100% free for students in India — no sign-up required to read. It contains 18 structured lessons with examples, and pairs with our free online compiler and AI tutor.

Course content (18 lessons)

  1. About This Course — Programming in Java — Complete University Course This is an advanced, exam-oriented treatment of Java for BCA/B.Tech university programmes. Every lesson goes beyond syntax into…
  2. Lesson 1: The Java Platform, JVM Architecture & OOP Overview — 1.1 What Makes Java "Write Once, Run Anywhere"? Java source code is never compiled directly to machine code . Instead, javac compiles .java files into bytecode ( .class files) — a…
  3. Lesson 2: Data Types, Variables, Operators & Type Casting — 2.1 The Eight Primitive Types Java is statically and strongly typed : every variable has a compile-time type that cannot silently change. Type Size Range Default Wrapper :--- :---…
  4. Lesson 3: Control Flow — Selection, Iteration & Jump Statements — 3.1 Selection: if, if-else, else-if Ladder The condition must be boolean — if (x = 5) is a compile error in Java (unlike C, where it is a silent bug). The dangling else binds to…
  5. Lesson 4: Arrays, Jagged Arrays & the String Family — 4.1 Arrays — Objects on the Heap A Java array is an object stored on the heap, even when it holds primitives. The reference lives on the stack; the contiguous element block lives…
  6. Lesson 5: Classes, Objects, Constructors, static & Garbage Collection — 5.1 Class vs Object — Blueprint vs Instance A class is a template defining state (fields) and behaviour (methods); an object is a runtime instance with its own copy of instance…
  7. Lesson 6: Inheritance, super, Overriding & the Object Class — 6.1 extends — IS-A Relationships Inheritance lets a subclass acquire the fields and methods of a superclass , modelling an IS-A relationship ( Dog extends Animal ). Java supports…
  8. Lesson 7: Polymorphism, Dynamic Dispatch & Abstract Classes — 7.1 Two Flavours of Polymorphism Kind Mechanism Resolved Also called :--- :--- :--- :--- Compile-time Method overloading By the compiler from argument types Static binding, early…
  9. Lesson 8: Interfaces — default/static Methods, Functional & Marker Interfaces — 8.1 What an Interface Really Is An interface is a pure contract: a type that says what an implementer can do, with no instance state. Implicit modifiers examiners test: Fields are…
  10. Lesson 9: Packages, import, Classpath & Access Modifiers — 9.1 Why Packages? A package is a namespace that groups related types, preventing name clashes (two libraries can each have a Logger ), enabling access control (package-private…
  11. Lesson 10: Exception Handling — Hierarchy, try-with-resources & Custom Exceptions — 10.1 The Throwable Hierarchy 10.2 Checked vs Unchecked — The Core Table Aspect Checked Unchecked :--- :--- :--- Inherits from Exception (minus RuntimeException) RuntimeException /…
  12. Lesson 11: Multithreading — Lifecycle, Synchronization, wait/notify & Executors — 11.1 Creating Threads: Thread vs Runnable Aspect extends Thread implements Runnable :--- :--- :--- Inheritance slot Consumed (no other parent possible) Free — can extend another…
  13. Lesson 12: Collections Framework — List/Set/Map, HashMap Internals & Generics — 12.1 The Hierarchy at a Glance Trap: Map does not extend Collection — it is a parallel hierarchy of key→value pairs. Rules of thumb: List = ordered + duplicates; Set = no…
  14. Lesson 13: File I/O — Streams, Readers/Writers, Serialization & NIO — 13.1 The File Class — Metadata, Not Contents java.io.File represents a path (file or directory) and manipulates metadata only — it never reads contents: 13.2 Byte Streams vs…
  15. Lesson 14: Lambda Expressions, Method References & the Stream API — 14.1 Lambda Syntax — Anonymous Behaviour A lambda expression is an inline implementation of a functional interface's single abstract method (Lesson 8): Rules: parameter types are…
  16. Lesson 15: JDBC — Drivers, PreparedStatement, ResultSet & Full CRUD — 15.1 JDBC Architecture & Driver Types JDBC (Java Database Connectivity) is a vendor-neutral API ( java.sql ) — your code talks to interfaces (Connection, Statement, ResultSet); a…
  17. Lesson 16: GUI with Swing — Components, Events, Layouts & Applet Lifecycle — 16.1 AWT vs Swing Aspect AWT Swing :--- :--- :--- Components Heavyweight (native OS peers) Lightweight (drawn in Java) Look & feel Platform-dependent Pluggable, consistent…
  18. PYQ: End Term May 2023

About This Course

Programming in Java — Complete University Course

This is an advanced, exam-oriented treatment of Java for BCA/B.Tech university programmes. Every lesson goes beyond syntax into JVM internals, memory behaviour (stack vs heap), and the traps examiners love — dynamic dispatch, string interning, HashMap internals, thread lifecycle, and more. Each lesson ends with an 🎯 Exam Focus block of PYQ-style questions, and most lessons ship a complete runnable program you can compile with javac and run immediately.

Unit-wise Syllabus Map

UnitTopicsLessons
Unit I — Java FundamentalsJava platform (JDK/JRE/JVM), bytecode & JIT, data types, operators, type casting, control flow, arrays & stringsLessons 1 – 4
Unit II — Object-Oriented ProgrammingClasses & objects, constructors, static members, inheritance, polymorphism, abstraction, interfaces, packages & access controlLessons 5 – 9
Unit III — Exception Handling & ConcurrencyException hierarchy, try-with-resources, custom exceptions, multithreading, synchronization, Collections Framework, genericsLessons 10 – 12
Unit IV — Advanced JavaFile I/O & serialization, Lambda expressions & Stream API, JDBC database connectivity, GUI with Swing & applet lifecycleLessons 13 – 16

How to Study This Course

  1. Read the theory tables carefully — comparison tables (e.g., String vs StringBuilder, checked vs unchecked exceptions, ArrayList vs LinkedList) are the single highest-yield exam material.
  2. Type out every code snippet — university papers almost always contain at least two "write a program" questions worth 10+ marks each.
  3. Trace outputs by hand — "predict the output" questions test constructor chaining order, static blocks, string pool behaviour, and exception flow.
  4. Finish with the Exam Focus questions — they are modelled directly on previous-year end-term papers.

Prerequisites

Basic programming logic (any language) is enough. C/C++ background helps because Java deliberately fixes several C++ pain points — no pointers, no multiple class inheritance, automatic garbage collection — and examiners frequently ask you to compare the two.

PYQ papers are available at the end of the lesson list.

Continue reading: About This Course →

Frequently asked questions

Is the Programming in Java course really free?

Yes. The entire Programming in Java course on Siksha Sarovar is free to read with no account required. You can optionally sign in with Google to save your progress.

Do I get a certificate for Programming in Java?

Yes — finish the lessons and pass the quiz to earn a free, verifiable certificate you can share on LinkedIn or with recruiters.

Can I run code while learning?

Yes. The built-in online compiler runs C, C++, Python, Java, PHP, JavaScript, C# and SQL directly in your browser — no installation needed.