Project Based Learning in Java

Unit 2 Java Programming - Chapters 2.1 and 2.2

Collections, multithreading, wrappers, I/O streams, serialization, cloning, and lambda-based data processing.

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

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

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

Chapter 2.1 covers collections and multithreading. Chapter 2.2 develops wrapper classes, file I/O, serialization, object copying, lambda expressions, method references, and Stream API operations through worked programs and practice questions.

Course MentorProf. (Dr.) Harish K Mittal

Syllabus Coverage

  • 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, serialization, and cloning
  • Functional interfaces, lambdas, and method references
  • Stream pipelines, filtering, mapping, sorting, and reduction

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.3 Thread Synchronisation and Priority Race conditions, synchronized methods and blocks, monitors, and priority hints. 08 Lecture 2.1.3 Thread Control and Coordination sleep, join, interruption, thread metadata, safe cancellation, and common mistakes.

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

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 Serialization and Deserialization 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.