Prof. (Dr. ) Harish Kumar MittalProfessor · Researcher · Educator

Project Based Learning in Java

Unit 2 Java Programming - Chapters 2.1 to 2.3

Java Database Connectivity (JDBC) is Java's standard interface for connecting to relational databases, issuing statements and reading results.

Collections, multithreading, file handling, functional programming, and JDBC database connectivity.

CollectList, Set, Map
→
Organizeorder, keys, uniqueness
→
Executethreads and coordination

Semester 5 - 24CSH-301 / 24ITH-301

Unit 2: Collections, I/O, and Functional Programming

Input/Output (I/O) means moving data into or out of a program, for example through a file or a stream.

Create, Read, Update and Delete (CRUD) are the four basic operations used to manage stored records. Model-View-Controller (MVC) separates application data and rules, user-facing presentation, and request or input handling. Data Access Object (DAO) is a component that separates database operations from business logic.

Chapter 2.1 covers collections and multithreading. Chapter 2.2 develops wrapper classes, file I/O, serialisation, object copying, lambdas, method references, and streams. Chapter 2.3 develops JDBC connections, CRUD, transactions, MVC and DAO design, generated keys, and date handling through worked examples.

Course MentorProf. (Dr.) Harish K Mittal

Syllabus Coverage

Java Virtual Machine (JVM) runs Java bytecode, the instructions produced by a Java compiler, and manages runtime tasks such as memory allocation.

  • Collection hierarchy, generics, Iterable, and Iterator
  • List, ArrayList, and LinkedList
  • Map, HashMap, TreeMap, Set, and HashSet
  • Thread creation with Thread and Runnable
  • Official JVM thread lifecycle states
  • sleep, join, interruption, and safe cancellation
  • Wrapper classes, autoboxing, unboxing, and parsing
  • Byte and character streams, serialisation, and cloning
  • Functional interfaces, lambdas, and method references
  • Stream pipelines, filtering, mapping, sorting, and reduction
  • JDBC architecture, driver configuration, and connections
  • Parameterised CRUD, transactions, MVC and DAO design
  • Sequences, DUAL, generated keys, and date/time mappings

Chapter 2.1 - Collections and Multithreading

01 Lecture 2.1.1 Java Collections Framework Collection hierarchy, generics, core operations, Iterable, and Iterator. 02 Lecture 2.1.1 List, ArrayList, and LinkedList Ordered collections, indexed access, list operations, and implementation choice. 03 Lecture 2.1.2 Map Interface and HashMap Key-value storage, map views, hashing, iteration, and practical update methods. 04 Lecture 2.1.2 TreeMap and Sorted Maps Sorted keys, comparators, navigation methods, range views, and map selection. 05 Lecture 2.1.2 Set Interface and HashSet Uniqueness, hashing, set algebra, duplicate removal, and equality rules. 06 Lecture 2.1.3 Java Threads and Their Lifecycle Concurrency, thread creation, start versus run, and the six JVM thread states. 07 Lecture 2.1.4 Thread Synchronisation and Priority Race conditions, synchronised methods and blocks, monitors, and priority hints. 08 Lecture 2.1.4 Thread Control and Coordination sleep, join, interruption, thread metadata, safe cancellation, and common mistakes.

Chapter 2.2 - Wrapper Classes, I/O Streams and Lambda Expressions

Unicode Transformation Format, 8-bit (UTF-8) encodes a Unicode scalar value using one to four bytes. Application Programming Interface (API) defines the operations one software component can use to communicate with another.

09 Lecture 2.2.1 Wrapper Classes and Autoboxing Primitive wrappers, autoboxing, unboxing, parsing, equality, and null handling. 10 Lecture 2.2.2 I/O Streams and File Handling Byte and character streams, UTF-8 files, buffering, and resource management. 11 Lecture 2.2.2 Serialisation and Deserialisation Object streams, Serializable, transient fields, versioning, and restoring object state. 12 Lecture 2.2.2 Object Cloning and Copying Reference assignment, Cloneable, shallow and deep copies, and copy constructors. 13 Lecture 2.2.3 Lambda Expressions and Functional Interfaces Lambda syntax, functional contracts, standard function types, and captured variables. 14 Lecture 2.2.3 Method and Constructor References Static, bound, unbound, and constructor references with compatible functional interfaces. 15 Lecture 2.2.3 Stream API and Data Processing Lazy pipelines, filter, map, sorting, collectors, reduction, and processing marks from files.

Chapter 2.3 - JDBC

16 Lecture 2.3.1 JDBC Architecture and Components JDBC types, drivers, query flow, and the difference between MVC layers and deployment tiers. 17 Lecture 2.3.1 JDBC Driver Types Four driver types, configuration requirements, runtime classpaths, and automatic registration. 18 Lecture 2.3.1 Establishing a Connection A reusable connection helper, lab setup, JDBC URLs, resource ownership, and error diagnosis. 19 Lecture 2.3.1 CRUD Operations with JDBC Parameter binding, result sets, CRUD programs, affected-row counts, and transaction rollback. 20 Lecture 2.3.2 MVC Architecture with JDBC and DAO Design A complete student CRUD menu with validation, a repository contract, and JDBC data access. 21 Lecture 2.3.3 Sequences, DUAL, and Date Types Oracle sequences and DUAL, MySQL generated keys, and date/time mappings with vendor differences.