FOR CORE AND IT JOBS · 7 CHAPTERS
Object-Oriented Programming with Java
For CSE/IT and DS & AI students. Short chapters, in reading order: classes and objects, inheritance, polymorphism, interfaces, exceptions, collections and design principles in java. Each one explains its ideas from first principles, with worked examples and questions to check yourself.
The chapters, in order
CHAPTER 1
Classes and objects in Java
This chapter explains how a Java program is built from objects that keep state and behaviour together.
Builds on the GATE topics: Functions & scope (Programming in C)
CHAPTER 2
Encapsulation and immutability
This chapter shows how a class keeps its own data valid by hiding fields behind methods, and why making an object unchangeable removes a whole family of bugs.
Read first: Chapter 1, Classes and objects
CHAPTER 3
Inheritance
This chapter explains how a class extends another, the order constructors run in, how overriding picks a method at run time, and what equals, hashCode and toString promise.
Read first: Chapter 2, Encapsulation, final
CHAPTER 4
Polymorphism, abstract classes and interfaces
This chapter explains how one call can run different code depending on the object behind it, and how abstract classes and interfaces set the contract that makes this safe.
Read first: Chapter 3, Inheritance and equals
CHAPTER 5
Exceptions
An exception is an object thrown when a method cannot continue, and it travels up the call stack until some code catches it.
Read first: Chapter 4, Polymorphism, interfaces
CHAPTER 6
Collections and generics
This chapter explains generics, the List, Set and Map families and their costs, safe looping, equals and hashCode for keys, and sorting.
Read first: Chapter 4, Polymorphism, interfaces
Builds on the GATE topics: Linear structures (Data Structures and Algorithms) · Sorting & hashing (Data Structures and Algorithms)
CHAPTER 7
Design principles and patterns
Some Java classes are easy to change; others break when touched.
Read first: Chapter 6, Collections, generics, Chapter 5, Exceptions
Who hires
What companies publish for students, by department: IT jobs for CSE/IT · IT jobs for DS & AI
All subjects for core and IT jobs