Java Programming – Teaching Guidelines (90 Hours)
Total Sessions: 45 × 2 Hours | Theory: ~52 Hours | Lab: ~38 Hours
MODULE 1: Introduction to Java (6 Hours – 3 Sessions)
Session 1 (Theory – 2 hrs): Introduction to Java & Environment Setup
History and evolution of Java
Features of Java (platform independence, OOP, robustness, etc.)
JVM Architecture: ClassLoader, Bytecode, JIT Compiler, Garbage Collection
JDK, JRE, JVM – differences and usage
Setting up Java environment and IDE (Eclipse / IntelliJ)
Structure of a Java class: package, import, class, main method
Session 2 (Theory – 2 hrs): Data Types, Variables, Operators & Tokens
Java Tokens: keywords, identifiers, literals, separators
Primitive data types: int, float, double, char, boolean, byte, short, long
Declaring and initializing variables
Type casting and data type compatibility
Operators: arithmetic, relational, logical, bitwise, assignment, ternary
Operator precedence and associativity
Session 3 (Lab – 2 hrs): Lab 1 – Java Basics
Setting up and running first Java program
Practice with variables, data types, and operators
Print different patterns of asterisks using various operators and expressions
MODULE 2: Control Flow & Arrays (8 Hours – 4 Sessions)
Session 4 (Theory – 2 hrs): Conditional Statements & Loops
if, if-else, if-else-if ladder, nested if
switch-case statement (traditional and enhanced switch – Java 14+)
Loops: for, while, do-while
Enhanced for loop
break, continue, return statements
Nested loops
Session 5 (Lab – 2 hrs): Lab 2 – Control Flow
Programs using conditional statements
Pattern printing using nested loops (triangles, pyramids, diamonds of *)
Number-based problems: prime, palindrome, Fibonacci using loops
Session 6 (Theory – 2 hrs): Arrays
Introduction to arrays, memory representation
1-D array: declaration, initialization, traversal
Multi-dimensional arrays (2-D, jagged arrays)
Array operations: searching (linear, binary), sorting (bubble, selection)
Passing arrays to methods; returning arrays from methods
Session 7 (Lab – 2 hrs): Lab 3 – Arrays
Programs on 1-D array operations (insert, delete, search, sort)
Matrix operations using 2-D arrays (addition, multiplication, transpose)
Jagged array demonstration
MODULE 3: Object-Oriented Programming (12 Hours – 6 Sessions)
Session 8 (Theory – 2 hrs): OOP Fundamentals – Classes & Objects
Introduction to OOP paradigm vs procedural programming
Classes and Objects: definition, creation, usage
Instance variables and instance methods
Constructors: default, parameterized, copy constructor
Constructor overloading
this keyword and its usages
static variables, static methods, static blocks
Session 9 (Lab – 2 hrs): Lab 4 – Classes & Objects
Design and instantiate classes with constructors and methods
Demonstrate this keyword, static members
Create an array of objects of a class and initialize with different instances
Session 10 (Theory – 2 hrs): Encapsulation & Abstraction
Encapsulation: access modifiers (public, private, protected, default)
Getters and setters; JavaBeans convention
Abstraction: abstract classes and abstract methods
Difference between abstraction and encapsulation
final variables, final methods, final class
Session 11 (Theory – 2 hrs): Inheritance & Polymorphism
Inheritance: single, multilevel, hierarchical (no multiple inheritance via class)
super keyword: calling parent constructor and methods
Method overriding rules
Polymorphism: compile-time (overloading) and runtime (overriding)
Upcasting and downcasting of reference variables
instanceof operator
Session 12 (Lab – 2 hrs): Lab 5 – OOP Principles
Create abstract class with abstract methods; extend and implement in subclass
Demonstrate runtime polymorphism using upcasting
Build a small class hierarchy (e.g., Shape → Circle, Rectangle) demonstrating inheritance
and polymorphism
Session 13 (Theory – 2 hrs): Interfaces, Packages & Enums
Interfaces: definition, implementation, default and static methods (Java 8), private
methods (Java 11)
Implementing multiple interfaces
Functional interfaces and the @FunctionalInterface annotation
Difference between abstract class and interface
Packages: creating, importing, access control across packages
Inner Classes: regular, method-local, anonymous, static nested
Enum: declaration, methods (values(), ordinal(), name()), use in switch
Session 14 (Lab – 2 hrs): Lab 6 – Interfaces, Packages & Enums
Implement multiple interfaces in a single class and override methods
Demonstrate default and static interface methods
Demonstrate enum usage in a real-world scenario (e.g., days, directions)
Create and use packages across multiple classes
MODULE 4: Core Java Classes (8 Hours – 4 Sessions)
Session 15 (Theory – 2 hrs): Object Class, Wrapper Classes & String
Object class methods: toString(), equals(), hashCode(), clone()
Overriding toString(), equals(), and hashCode()
Wrapper classes: Integer, Double, Character, Boolean, etc.
Autoboxing and unboxing; constant pools and caching
String class: immutability, string pool, common methods
StringBuffer vs StringBuilder: mutability, thread safety, performance
String comparison: == vs equals() vs compareTo()
Session 16 (Lab – 2 hrs): Lab 7 – Core Classes
Demonstrate boxing/unboxing and constant pool behavior
Override toString(), equals(), hashCode() in a custom class
String manipulation programs: palindrome, anagram, word count, reverse
Session 17 (Theory – 2 hrs): Date/Time API & Exception Handling – Part 1
Legacy Date and Calendar class (overview)
Java 8 Date/Time API: LocalDate, LocalTime, LocalDateTime, ZonedDateTime
Period, Duration, DateTimeFormatter
Exception hierarchy: Throwable → Error vs Exception
Checked vs unchecked exceptions
Exception propagation through call stack
Session 18 (Theory – 2 hrs): Exception Handling – Part 2
try-catch block, multiple catch blocks (multi-catch with |)
finally block: purpose and guaranteed execution
throws clause vs throw keyword
try-with-resources (AutoCloseable)
Creating user-defined checked exceptions
Creating user-defined unchecked (runtime) exceptions
Session 19 (Lab – 2 hrs): Lab 8 – Exception Handling
Create custom checked and unchecked exceptions and demonstrate propagation
Use try-catch-finally and try-with-resources in programs
Build a mini banking transaction simulator with custom exceptions
MODULE 5: Collections Framework (12 Hours – 6 Sessions)
Session 20 (Theory – 2 hrs): Introduction to Collections & List
Collections framework hierarchy: Collection, List, Set, Queue, Map
ArrayList: internal working, dynamic resizing, CRUD operations
LinkedList: doubly linked structure, use as List and Deque
Vector: legacy class, thread safety
Iterator and ListIterator: traversal and modification during iteration
Collections utility class: sort(), reverse(), shuffle(), frequency()
Session 21 (Lab – 2 hrs): Lab 9 – List Collections
Perform insert, delete, search, sort, and iterate on ArrayList and LinkedList
Compare performance of ArrayList vs LinkedList for different operations
Use Iterator to safely remove elements during traversal
Session 22 (Theory – 2 hrs): Set & Queue Collections
Set interface: no duplicates, unordered
HashSet: internal hashing, performance
LinkedHashSet: insertion order maintained
TreeSet: natural ordering, SortedSet interface
Queue interface: FIFO behavior
PriorityQueue: heap-based ordering
ArrayDeque: double-ended queue usage
Session 23 (Theory – 2 hrs): Map Collections
Map interface: key-value pairs, no duplicate keys
HashMap: internal working (hashing, buckets, load factor, Java 8 tree bins)
LinkedHashMap: insertion order
TreeMap: sorted keys, NavigableMap
Hashtable vs HashMap
Map iteration: entrySet(), keySet(), values()
Nested collections
Session 24 (Lab – 2 hrs): Lab 10 – Set & Map Collections
Demonstrate HashSet, LinkedHashSet, TreeSet with duplicate handling
Build a word frequency counter using HashMap
Implement a phone directory using TreeMap with sorted output
Use [Link] to iterate and manipulate maps
Session 25 (Theory – 2 hrs): Sorting Collections – Comparable & Comparator
Comparable interface: natural ordering using compareTo()
Comparator interface: custom ordering using compare()
Sorting using [Link]() with Comparable and Comparator
Chaining comparators: [Link]()
Sorting Maps by value using Comparator
Session 26 (Lab – 2 hrs): Lab 11 – Sorting & Comparators
Sort a list of custom objects (e.g., Student, Employee) using Comparable
Sort the same list using multiple Comparator strategies (by name, age, salary)
Sort a Map by value using stream and Comparator
MODULE 6: Lambda Expressions, Stream API & Annotations (8 Hours – 4 Sessions)
Session 27 (Theory – 2 hrs): Lambda Expressions
Functional programming concepts
Lambda expression syntax: parameters, body, return
Functional interfaces: Predicate, Function, Consumer, Supplier, BiFunction
Method references: static, instance, constructor references
Variable capture in lambdas (effectively final)
Session 28 (Lab – 2 hrs): Lab 12 – Lambda Expressions
Replace anonymous inner classes with lambda expressions
Use Predicate, Function, Consumer, Supplier with collections
Implement Comparator using lambda and method references
Session 29 (Theory – 2 hrs): Stream API
Introduction to streams vs collections
Creating streams: from collections, arrays, [Link](), [Link](),
[Link]()
Intermediate operations: filter(), map(), flatMap(), distinct(), sorted(), peek(), limit(),
skip()
Terminal operations: collect(), forEach(), reduce(), count(), min(), max(), findFirst(),
anyMatch()
Collectors: toList(), toSet(), toMap(), groupingBy(), partitioningBy(), joining()
Parallel streams: when and how to use
Session 30 (Lab – 2 hrs): Lab 13 – Stream API
Filter, transform, and collect data from a list of objects using Streams
Group employees by department using groupingBy()
Chain multiple intermediate and terminal operations in a pipeline
Compare sequential vs parallel stream performance
Session 31 (Theory – 2 hrs): Annotations
Introduction to annotations and their purpose
Built-in annotations: @Override, @Deprecated, @SuppressWarnings,
@FunctionalInterface
Meta-annotations: @Target, @Retention, @Documented, @Inherited
Creating custom annotations
Accessing annotations at runtime using reflection
Annotations in frameworks (brief conceptual overview: Spring, JUnit)
Session 32 (Lab – 2 hrs): Lab 14 – Annotations & Reflection
Demonstrate built-in annotations with practical examples
Create and process a custom annotation using reflection
Apply custom annotations to a class and read them at runtime
MODULE 7: Database Concepts & JDBC (10 Hours – 5 Sessions)
Session 33 (Theory – 2 hrs): Introduction to Database Concepts
What is a database? DBMS vs RDBMS
Relational model: tables, rows, columns, primary key, foreign key
Relationships: one-to-one, one-to-many, many-to-many
Introduction to SQL: DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE), DQL
(SELECT)
WHERE clause, ORDER BY, GROUP BY, HAVING
Joins: INNER, LEFT, RIGHT, FULL OUTER
Session 34 (Theory – 2 hrs): Advanced SQL & Normalization
Aggregate functions: COUNT, SUM, AVG, MIN, MAX
Subqueries and nested queries
Views and indexes
Introduction to normalization: 1NF, 2NF, 3NF
Transactions: ACID properties, COMMIT, ROLLBACK, SAVEPOINT
Constraints: NOT NULL, UNIQUE, CHECK, DEFAULT, PRIMARY KEY, FOREIGN KEY
Session 35 (Lab – 2 hrs): Lab 15 – SQL Practice
Create database schema (e.g., Student-Course or Employee-Department)
Practice DDL and DML statements
Write queries with joins, aggregate functions, and subqueries
Practice transaction control statements
Session 36 (Theory – 2 hrs): JDBC – Architecture & Connectivity
What is JDBC? JDBC architecture and driver types
Steps to connect Java with a database
Loading driver, establishing Connection, creating Statement
Executing queries: executeQuery(), executeUpdate(), execute()
ResultSet: navigating and reading results
Closing resources; using try-with-resources for JDBC
Session 37 (Lab – 2 hrs): Lab 16 – JDBC Basics
Connect a Java application to MySQL/PostgreSQL
Perform INSERT, UPDATE, DELETE, and SELECT using Statement
Display results from ResultSet in console
Handle SQLExceptions properly
Session 38 (Lab – 2 hrs): Lab 17 – Advanced JDBC
Use PreparedStatement to prevent SQL injection and improve performance
Use CallableStatement for stored procedures
Implement batch processing using addBatch() and executeBatch()
Manage transactions manually: setAutoCommit(false), commit(), rollback()
Build a small CRUD application (e.g., Student or Product Manager) using JDBC
MODULE 8: JUnit Testing (6 Hours – 3 Sessions)
Session 39 (Theory – 2 hrs): Introduction to JUnit
What is unit testing? Why it matters in software development
Introduction to JUnit 5 (Jupiter): architecture and modules
JUnit 5 Annotations: @Test, @BeforeEach, @AfterEach, @BeforeAll, @AfterAll,
@Disabled, @DisplayName
Assertions: assertEquals(), assertNotEquals(), assertTrue(), assertFalse(), assertNull(),
assertNotNull(), assertThrows(), assertAll()
Test lifecycle and execution order
Session 40 (Lab – 2 hrs): Lab 18 – Writing Basic JUnit Tests
Write unit tests for a simple Calculator class
Use all major assertion methods with meaningful test names
Use @BeforeEach and @AfterEach to manage test setup and teardown
Demonstrate @Disabled and @DisplayName annotations
Session 41 (Lab – 2 hrs): Lab 19 – Advanced JUnit Testing
Write parameterized tests using @ParameterizedTest and @ValueSource / @CsvSource
Test exception scenarios using assertThrows()
Write tests for custom exception classes
Test a multi-class application (e.g., the JDBC CRUD app) with JUnit
Interpret test results and reports in the IDE
MODULE 9: Revision, Integration & Mini Project (10 Hours – 5 Sessions)
Session 42 (Theory + Discussion – 2 hrs): Revision – Modules 1 to 4
Rapid revision of Java basics, OOP, core classes, and exception handling
Q&A and concept clarification
Common interview questions and pitfalls
Session 43 (Theory + Discussion – 2 hrs): Revision – Modules 5 to 8
Rapid revision of Collections, Streams, Lambdas, JDBC, and JUnit
Discussion of best practices: naming conventions, code readability, clean code
Introduction to design patterns (Singleton, Factory) – conceptual overview
Session 44 (Lab – 2 hrs): Mini Project – Part 1 (Design & Setup)
Students form groups or work individually
Define project scope: Console-based application (e.g., Library Management System,
Student Result System, Inventory Manager)
Design class hierarchy, database schema
Set up project structure, packages, and database connection
Session 45 (Lab – 2 hrs): Mini Project – Part 2 (Implementation & Demo)
Implement core features: CRUD via JDBC, OOP structure, Collections usage
Add exception handling and at least 3 JUnit test cases
Demo and brief walkthrough of the project
Peer review and instructor feedback