Java Library System

Su Suriya Ravichandran Updated 18 Nov 2026
14 min read ·Lesson 298 of 306

A Java library system tracks books, members and loans: who borrowed which book, when it is due and how much fine is owed. Unlike the single-class projects before it, it has several classes that work together, plus business rules that can say "no". This makes it an excellent practice project for object-oriented design, the java.time API, custom exceptions and stream reports.

It builds on the Java Student Manager. You model the library with records and an enum, calculate due dates and fines, enforce borrowing rules, and finish with library-system.jar, which replays a month of activity and prints an overdue and popularity report. All examples were run on JDK 21.


Design the Library System Classes

Before writing code, decide what each class is responsible for.

ClassTypeResponsibility
BookrecordISBN, title, author of a catalogue entry
MemberTypeenumBorrowing limits: how many books, for how many days
MemberrecordId, name and type of a library member
LoanclassOne book lent to one member; due date and fine
LibraryExceptionexceptionA library rule blocked the action
LibraryclassCatalogue, shelf copies, members, all loans, the rules

Book and Member never change, so records fit them. A Loan changes when the book comes back, so it is a normal class with one mutable field.


Model Books and Members With Records and Enums

package com.gocourse.library;

/** A title in the catalogue. Several physical copies can share one ISBN. */
public record Book(String isbn, String title, String author) {
    public Book {
        if (isbn == null || !isbn.matches("\\d{13}")) {
            throw new IllegalArgumentException("ISBN must be 13 digits: " + isbn);
        }
        if (title == null || title.isBlank()) throw new IllegalArgumentException("title is required");
    }
}
package com.gocourse.library;

/** Borrowing rules differ for each kind of member. */
public enum MemberType {
    STUDENT(3, 14),
    FACULTY(10, 30);

    private final int maxBooks;
    private final int loanDays;

    MemberType(int maxBooks, int loanDays) {
        this.maxBooks = maxBooks;
        this.loanDays = loanDays;
    }

    public int maxBooks() { return maxBooks; }
    public int loanDays() { return loanDays; }
}
package com.gocourse.library;

public record Member(int id, String name, MemberType type) { }

A quick check of the model:

package com.gocourse.library;

public class ModelDemo {
    public static void main(String[] args) {
        Book cleanCode = new Book("9780132350884", "Clean Code", "Robert C. Martin");
        Member priya = new Member(101, "Priya", MemberType.STUDENT);
        Member drRao = new Member(201, "Dr. Rao", MemberType.FACULTY);

        System.out.println(cleanCode);
        for (Member m : new Member[] {priya, drRao}) {
            System.out.printf("%-8s %-8s max %2d books, %2d days%n",
                    m.name(), m.type(), m.type().maxBooks(), m.type().loanDays());
        }

        try {
            new Book("12345", "Bad Book", "Nobody");
        } catch (IllegalArgumentException e) {
            System.out.println("Rejected: " + e.getMessage());
        }
    }
}
Book[isbn=9780132350884, title=Clean Code, author=Robert C. Martin]
Priya    STUDENT  max  3 books, 14 days
Dr. Rao  FACULTY  max 10 books, 30 days
Rejected: ISBN must be 13 digits: 12345

How it works:

  • isbn.matches("0d{13}") uses a regular expression to require exactly 13 digits, the modern ISBN length. The invalid book never gets created.
  • The ISBN is stored as a String, not a long. It is an identifier, not a number you calculate with, and some identifiers start with 0.
  • MemberType keeps the rules in one place. Changing the student limit to 4 books means editing one line.

Calculate Due Dates and Fines With LocalDate

A loan's due date is the borrow date plus the member's loan days. The fine is a fixed amount for each day after the due date, using the Java LocalDate API.

package com.gocourse.library;

import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

/** One book lent to one member. It stays in the history after it is returned. */
public class Loan {
    public static final int FINE_PER_DAY = 5;   // rupees per late day

    private final Book book;
    private final Member member;
    private final LocalDate borrowedOn;
    private final LocalDate dueOn;
    private LocalDate returnedOn;   // null while the book is still out

    public Loan(Book book, Member member, LocalDate borrowedOn) {
        this.book = book;
        this.member = member;
        this.borrowedOn = borrowedOn;
        this.dueOn = borrowedOn.plusDays(member.type().loanDays());
    }

    public boolean isActive() { return returnedOn == null; }

    public boolean isOverdue(LocalDate today) {
        return isActive() && today.isAfter(dueOn);
    }

    /** Late days counted up to the return date, or up to today if still out. */
    public long daysLate(LocalDate today) {
        LocalDate end = isActive() ? today : returnedOn;
        return Math.max(0, ChronoUnit.DAYS.between(dueOn, end));
    }

    public long fine(LocalDate today) {
        return daysLate(today) * FINE_PER_DAY;
    }

    void markReturned(LocalDate date) {
        if (!isActive()) throw new IllegalStateException("Already returned");
        returnedOn = date;
    }

    public Book book() { return book; }
    public Member member() { return member; }
    public LocalDate borrowedOn() { return borrowedOn; }
    public LocalDate dueOn() { return dueOn; }
}
package com.gocourse.library;

import java.time.LocalDate;

public class LoanDemo {
    public static void main(String[] args) {
        Book book = new Book("9780134685991", "Effective Java", "Joshua Bloch");
        Member priya = new Member(101, "Priya", MemberType.STUDENT);

        Loan loan = new Loan(book, priya, LocalDate.of(2026, 11, 1));
        System.out.println("Borrowed " + loan.borrowedOn() + ", due " + loan.dueOn());

        LocalDate[] checkDates = {
                LocalDate.of(2026, 11, 10),   // before the due date
                LocalDate.of(2026, 11, 15),   // on the due date
                LocalDate.of(2026, 11, 19),   // 4 days late
        };
        for (LocalDate day : checkDates) {
            System.out.printf("%s overdue=%-5b late=%d fine=Rs.%d%n",
                    day, loan.isOverdue(day), loan.daysLate(day), loan.fine(day));
        }

        loan.markReturned(LocalDate.of(2026, 11, 19));
        // after returning, the fine is frozen at the return date
        System.out.println("Returned. Fine on 2026-12-31 is still Rs." + loan.fine(LocalDate.of(2026, 12, 31)));
    }
}
Borrowed 2026-11-01, due 2026-11-15
2026-11-10 overdue=false late=0 fine=Rs.0
2026-11-15 overdue=false late=0 fine=Rs.0
2026-11-19 overdue=true  late=4 fine=Rs.20
Returned. Fine on 2026-12-31 is still Rs.20

How it works:

  • plusDays(14) handles month lengths and leap years for you. Borrowing on 25 February still gives a correct date in March.
  • ChronoUnit.DAYS.between(dueOn, end) counts whole days. Before the due date it is negative, so Math.max(0, ...) keeps it at zero.
  • Returning on the due date is not late, because isAfter is strictly "after".
  • Once returnedOn is set, daysLate measures up to the return date instead of today, so the fine stops growing.
  • Every method takes today as a parameter instead of calling LocalDate.now(). This makes the results repeatable: the same inputs always give the same fine.

Note: markReturned has no public modifier, so only classes in the same package (the Library) can call it. A caller outside the package cannot mark a loan returned without putting the copy back on the shelf.


Enforce Library Rules With a Custom Exception

When a rule blocks an action, the Library throws LibraryException with a message the user can understand. See Java Custom Exceptions for more on designing exception classes.

package com.gocourse.library;

/** Thrown when a library rule blocks an action, such as borrowing a book with no copies left. */
public class LibraryException extends RuntimeException {
    public LibraryException(String message) {
        super(message);
    }
}
package com.gocourse.library;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/** The library: catalogue, copies on the shelf, members and every loan ever made. */
public class Library {
    private final Map<String, Book> catalogue = new LinkedHashMap<>();
    private final Map<String, Integer> copiesOnShelf = new HashMap<>();
    private final Map<Integer, Member> members = new HashMap<>();
    private final List<Loan> loans = new ArrayList<>();

    public void addBook(Book book, int copies) {
        catalogue.putIfAbsent(book.isbn(), book);
        copiesOnShelf.merge(book.isbn(), copies, Integer::sum);   // adds to existing copies
    }

    public void addMember(Member member) {
        members.put(member.id(), member);
    }

    public Loan borrow(int memberId, String isbn, LocalDate today) {
        Member member = findMember(memberId);
        Book book = findBook(isbn);

        List<Loan> active = activeLoans(member);
        if (active.stream().anyMatch(loan -> loan.isOverdue(today))) {
            throw new LibraryException(member.name() + " has an overdue book. Return it first.");
        }
        if (active.size() >= member.type().maxBooks()) {
            throw new LibraryException(member.name() + " already has " + active.size()
                    + " books (limit " + member.type().maxBooks() + ")");
        }
        if (active.stream().anyMatch(loan -> loan.book().equals(book))) {
            throw new LibraryException(member.name() + " already has '" + book.title() + "'");
        }
        if (copiesOnShelf.get(isbn) == 0) {
            throw new LibraryException("No copies of '" + book.title() + "' on the shelf");
        }

        copiesOnShelf.merge(isbn, -1, Integer::sum);
        Loan loan = new Loan(book, member, today);
        loans.add(loan);
        return loan;
    }

    /** Returns the book and gives back the fine in rupees (0 if on time). */
    public long returnBook(int memberId, String isbn, LocalDate today) {
        Member member = findMember(memberId);
        Loan loan = activeLoans(member).stream()
                .filter(l -> l.book().isbn().equals(isbn))
                .findFirst()
                .orElseThrow(() -> new LibraryException(member.name() + " did not borrow " + isbn));
        loan.markReturned(today);
        copiesOnShelf.merge(isbn, 1, Integer::sum);
        return loan.fine(today);
    }

    public List<Book> search(String text) {
        String needle = text.toLowerCase();
        return catalogue.values().stream()
                .filter(b -> b.title().toLowerCase().contains(needle)
                        || b.author().toLowerCase().contains(needle))
                .toList();
    }

    public int available(String isbn) {
        return copiesOnShelf.getOrDefault(isbn, 0);
    }

    public List<Loan> overdueLoans(LocalDate today) {
        return loans.stream()
                .filter(loan -> loan.isOverdue(today))
                .sorted(Comparator.comparing(Loan::dueOn))
                .toList();
    }

    /** How many times each title has been borrowed, most popular first. */
    public Map<String, Long> popularity() {
        Map<String, Long> counts = loans.stream()
                .collect(Collectors.groupingBy(loan -> loan.book().title(), Collectors.counting()));
        return counts.entrySet().stream()
                .sorted(Map.Entry.<String, Long>comparingByValue().reversed()
                        .thenComparing(Map.Entry.comparingByKey()))
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
                        (a, b) -> a, LinkedHashMap::new));
    }

    public List<Loan> activeLoans(Member member) {
        return loans.stream().filter(l -> l.isActive() && l.member().equals(member)).toList();
    }

    public Member findMember(int id) {
        Member member = members.get(id);
        if (member == null) throw new LibraryException("No member with id " + id);
        return member;
    }

    private Book findBook(String isbn) {
        Book book = catalogue.get(isbn);
        if (book == null) throw new LibraryException("No book with ISBN " + isbn);
        return book;
    }
}

How it works:

  • copiesOnShelf.merge(isbn, -1, Integer::sum) subtracts one copy, and merge(isbn, 1, ...) adds it back. In addBook, merge adds new copies to any that already exist.
  • borrow checks the rules in order and throws on the first failure: overdue books, the member's limit, a duplicate title, then shelf stock. Nothing changes until all checks pass.
  • Loans are never deleted. A returned loan stays in loans with its return date, so the library keeps a full history for reports such as popularity().
  • popularity() counts loans per title with groupingBy(..., counting()), then sorts by count (highest first) and by title for ties. LinkedHashMap::new keeps that sorted order in the result.

Test the Borrowing Rules

package com.gocourse.library;

import java.time.LocalDate;

public class BorrowRulesDemo {
    static void attempt(String label, Runnable action) {
        try {
            action.run();
            System.out.println("OK    " + label);
        } catch (LibraryException e) {
            System.out.println("NO    " + label + " -> " + e.getMessage());
        }
    }

    public static void main(String[] args) {
        Library library = new Library();
        library.addBook(new Book("9780132350884", "Clean Code", "Robert C. Martin"), 1);
        library.addBook(new Book("9780134685991", "Effective Java", "Joshua Bloch"), 2);
        library.addBook(new Book("9781617294945", "Spring in Action", "Craig Walls"), 2);
        library.addBook(new Book("9780596009205", "Head First Java", "Kathy Sierra"), 2);
        library.addMember(new Member(101, "Priya", MemberType.STUDENT));
        library.addMember(new Member(102, "Karan", MemberType.STUDENT));

        LocalDate day1 = LocalDate.of(2026, 11, 1);
        attempt("Priya borrows Clean Code", () -> library.borrow(101, "9780132350884", day1));
        attempt("Karan borrows Clean Code", () -> library.borrow(102, "9780132350884", day1));
        attempt("Priya borrows Effective Java", () -> library.borrow(101, "9780134685991", day1));
        attempt("Priya borrows Effective Java again", () -> library.borrow(101, "9780134685991", day1));
        attempt("Priya borrows Spring in Action", () -> library.borrow(101, "9781617294945", day1));
        attempt("Priya borrows Head First Java", () -> library.borrow(101, "9780596009205", day1));
        attempt("Karan borrows ISBN 9999999999999", () -> library.borrow(102, "9999999999999", day1));

        LocalDate day20 = LocalDate.of(2026, 11, 20);
        attempt("Priya returns Spring in Action (5 days late)", () -> {
            long fine = library.returnBook(101, "9781617294945", day20);
            System.out.println("      fine to pay: Rs." + fine);
        });
        attempt("Priya borrows Head First Java", () -> library.borrow(101, "9780596009205", day20));
        System.out.println("Clean Code copies on shelf: " + library.available("9780132350884"));
    }
}
OK    Priya borrows Clean Code
NO    Karan borrows Clean Code -> No copies of 'Clean Code' on the shelf
OK    Priya borrows Effective Java
NO    Priya borrows Effective Java again -> Priya already has 'Effective Java'
OK    Priya borrows Spring in Action
NO    Priya borrows Head First Java -> Priya already has 3 books (limit 3)
NO    Karan borrows ISBN 9999999999999 -> No book with ISBN 9999999999999
      fine to pay: Rs.25
OK    Priya returns Spring in Action (5 days late)
NO    Priya borrows Head First Java -> Priya has an overdue book. Return it first.
Clean Code copies on shelf: 0

How it works:

  • attempt takes the action as a Runnable lambda, runs it and prints OK or the rule that blocked it. This keeps the demo short and readable.
  • The only copy of Clean Code is with Priya, so Karan is refused.
  • Priya's fourth book is refused by the STUDENT limit of 3.
  • On 20 November, Priya returns one book 5 days late (5 x Rs.5 = Rs.25), but she still holds two other books that were due on 15 November. The overdue rule blocks her next loan until she returns them.

Real-World Example: Run a Month in the Java Library System

LibraryApp replays a list of events, like the entries in a library's daily register, and prints an end-of-month report.

package com.gocourse.library;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;

/** Replays a month of library activity and prints the end-of-month report. */
public class LibraryApp {
    private static final DateTimeFormatter DAY = DateTimeFormatter.ofPattern("dd MMM");

    record Event(LocalDate date, String action, int memberId, String isbn) { }

    public static void main(String[] args) {
        Library library = new Library();
        library.addBook(new Book("9780132350884", "Clean Code", "Robert C. Martin"), 2);
        library.addBook(new Book("9780134685991", "Effective Java", "Joshua Bloch"), 1);
        library.addBook(new Book("9780596009205", "Head First Java", "Kathy Sierra"), 3);
        library.addBook(new Book("9781617294945", "Spring in Action", "Craig Walls"), 1);
        library.addMember(new Member(101, "Priya", MemberType.STUDENT));
        library.addMember(new Member(102, "Karan", MemberType.STUDENT));
        library.addMember(new Member(201, "Dr. Rao", MemberType.FACULTY));

        List<Event> month = List.of(
                new Event(LocalDate.of(2026, 11, 2), "borrow", 101, "9780596009205"),
                new Event(LocalDate.of(2026, 11, 2), "borrow", 201, "9780134685991"),
                new Event(LocalDate.of(2026, 11, 3), "borrow", 102, "9780134685991"),
                new Event(LocalDate.of(2026, 11, 3), "borrow", 102, "9780132350884"),
                new Event(LocalDate.of(2026, 11, 5), "borrow", 201, "9781617294945"),
                new Event(LocalDate.of(2026, 11, 14), "return", 101, "9780596009205"),
                new Event(LocalDate.of(2026, 11, 14), "borrow", 101, "9780132350884"),
                new Event(LocalDate.of(2026, 11, 20), "return", 102, "9780132350884"),
                new Event(LocalDate.of(2026, 11, 21), "borrow", 102, "9780596009205"),
                new Event(LocalDate.of(2026, 11, 22), "borrow", 102, "9780596009205"));

        System.out.println("=== November activity ===");
        for (Event e : month) {
            String who = library.findMember(e.memberId()).name();
            String prefix = e.date().format(DAY) + "  " + who + " " + e.action() + "s " + e.isbn();
            try {
                if (e.action().equals("borrow")) {
                    Loan loan = library.borrow(e.memberId(), e.isbn(), e.date());
                    System.out.println(prefix + " -> due " + loan.dueOn().format(DAY));
                } else {
                    long fine = library.returnBook(e.memberId(), e.isbn(), e.date());
                    System.out.println(prefix + (fine > 0 ? " -> fine Rs." + fine : " -> on time"));
                }
            } catch (LibraryException ex) {
                System.out.println(prefix + " -> REFUSED: " + ex.getMessage());
            }
        }

        LocalDate monthEnd = LocalDate.of(2026, 11, 30);
        System.out.println("\n=== Overdue on " + monthEnd.format(DAY) + " ===");
        long totalFines = 0;
        for (Loan loan : library.overdueLoans(monthEnd)) {
            System.out.printf("%-8s %-17s due %s  %2d days late  Rs.%d%n",
                    loan.member().name(), loan.book().title(), loan.dueOn().format(DAY),
                    loan.daysLate(monthEnd), loan.fine(monthEnd));
            totalFines += loan.fine(monthEnd);
        }
        System.out.println("Fines owed so far: Rs." + totalFines);

        System.out.println("\n=== Most borrowed ===");
        library.popularity().forEach((title, count) -> System.out.println(count + "  " + title));

        System.out.println("\n=== Search 'java' ===");
        for (Book b : library.search("java")) {
            System.out.printf("%-17s by %-13s %d on shelf%n", b.title(), b.author(), library.available(b.isbn()));
        }
    }
}
library-system/
└── src/
    └── com/
        └── gocourse/
            └── library/
                ├── Book.java
                ├── Library.java
                ├── LibraryApp.java
                ├── LibraryException.java
                ├── Loan.java
                ├── Member.java
                └── MemberType.java
cd library-system
javac -d out src/com/gocourse/library/*.java
jar --create --file library-system.jar --main-class com.gocourse.library.LibraryApp -C out .
java -jar library-system.jar
=== November activity ===
02 Nov  Priya borrows 9780596009205 -> due 16 Nov
02 Nov  Dr. Rao borrows 9780134685991 -> due 02 Dec
03 Nov  Karan borrows 9780134685991 -> REFUSED: No copies of 'Effective Java' on the shelf
03 Nov  Karan borrows 9780132350884 -> due 17 Nov
05 Nov  Dr. Rao borrows 9781617294945 -> due 05 Dec
14 Nov  Priya returns 9780596009205 -> on time
14 Nov  Priya borrows 9780132350884 -> due 28 Nov
20 Nov  Karan returns 9780132350884 -> fine Rs.15
21 Nov  Karan borrows 9780596009205 -> due 05 Dec
22 Nov  Karan borrows 9780596009205 -> REFUSED: Karan already has 'Head First Java'

=== Overdue on 30 Nov ===
Priya    Clean Code        due 28 Nov   2 days late  Rs.10
Fines owed so far: Rs.10

=== Most borrowed ===
2  Clean Code
2  Head First Java
1  Effective Java
1  Spring in Action

=== Search 'java' ===
Effective Java    by Joshua Bloch  0 on shelf
Head First Java   by Kathy Sierra  2 on shelf

How it works:

  1. Different rules per member. Dr. Rao is FACULTY, so his loans are due after 30 days (2 December), while students get 14 days.
  2. Shared stock. There is one copy of Effective Java. Once Dr. Rao borrowed it, Karan was refused the next day.
  3. Fines on return. Karan returned Clean Code on 20 November, 3 days after its 17 November due date, and paid 3 x Rs.5 = Rs.15. Because he returned it, he was allowed to borrow again on 21 November.
  4. Overdue report. On 30 November, only Priya's copy of Clean Code (due 28 November) is overdue. Karan's fine was already settled at return, so the report lists only fines still growing.
  5. History-based reports. Clean Code and Head First Java were each borrowed twice. They tie on count, so they are ordered alphabetically.
  6. Readable dates. DateTimeFormatter.ofPattern("dd MMM") prints 02 Nov instead of 2026-11-02, as covered in Java Date Formatting.

The next project, the Java Bank App, applies the same rule-checking approach to money, where exact decimal arithmetic and safe concurrent updates matter.

0 Comments

Reviewed before they appear

No comments yet.

Java
Java Introduction Java Features Java Syntax Java Comments Java Statements Java Output Java Variables Java Data Types Java Type Casting Java Operators Java Strings Java Numbers Java Math Java Booleans Java User Input Java Conditions Java If Else Java Switch Java While Loop Java For Loop Java Break Java Continue Java Arrays Java Methods Java Parameters Java Return Values Java Scope Java Recursion Install Java Install JDK Java IDEs Java JDK Java JRE Java JVM Java Compiler Java File Compile Java Run Java JShell Basics Java Packages Java OOP Java Classes Java Objects Class Methods Constructors Constructor Overload this Keyword static Keyword final Keyword Encapsulation Inheritance Polymorphism Abstraction Access Modifiers super Keyword Method Overload Method Override Instanceof Operator Nested Classes Inner Classes Anonymous Classes Enums Records Array Basics Array Length Loop Arrays Multidimensional Arrays Array Copy Array Sorting Array Search ArrayList LinkedList HashSet TreeSet HashMap TreeMap Queue Interface Deque Interface Stack Class Iterator List Interface Set Interface Map Interface Collections Class Comparable Comparator Generics Basics Generic Classes Generic Methods Wildcards String Basics String Length String Methods String Concatenation String Compare String Search String Replace String Split String Format StringBuilder StringBuffer Text Blocks Regular Expressions Number Types Integer Class Float Class Double Class BigInteger BigDecimal Math Class Random Numbers Number Format Date Basics LocalDate LocalTime LocalDateTime ZonedDateTime Date Formatting Date Parsing Period Class Duration Class Java Instant Class Java Exception Basics Java try...catch Java Multiple Catch Blocks Java finally Block Java throw Keyword Java throws Keyword Java Checked Exceptions Java Unchecked Exceptions Java Custom Exceptions Java try-with-resources Java Exception Chaining Java File Basics Java Create Files Java Read Files Java Write Files Java Delete Files Java File Paths Java File Class Java BufferedReader Java BufferedWriter Java FileInputStream Java FileOutputStream Java Object Streams Java Directory Handling Java NIO Basics Java Files API Java Input Java Scanner Class Java Console Input Java PrintStream Java InputStream Java OutputStream Java Reader Class Java Writer Class Java Buffered Streams Java Data Streams Java Generics Introduction Java Generic Types Java Generic Methods Java Bounded Types Java Wildcards Java Type Erasure Java Generic Interfaces Java Generic Collections Java Lambda Basics Java Lambda Syntax Java Functional Interfaces Java Method References Java Stream API Java Stream Creation Java Stream Filter Java Stream Map Java Stream Reduce Java Stream Sort Java Stream Collect Java Collectors Class Java Optional Class Java Parallel Streams Java Threads: Thread Basics Create a Thread in Java Java Thread Class Java Runnable Interface Java Thread States Java Thread Sleep Java Thread Join Java Thread Priority Java Synchronization Java Thread Safety Java Race Conditions Java Deadlocks Java Executor Service Java Thread Pools Java Callable Interface Java Future Interface Java CompletableFuture Java Concurrent Collections Java Atomic Classes Java Virtual Threads Java Networking Basics Java URL Class Java URI Class Java HttpClient Java HTTP Requests Java HTTP Responses Java Socket Basics Java ServerSocket Java DatagramSocket Java WebSocket Basics Java JDBC Basics Java JDBC Setup Java Database Connection Java JDBC Connection Interface Java JDBC Statement Java PreparedStatement Java ResultSet Java JDBC CRUD Operations Java JDBC Transactions Java JDBC Batch Update Java Connection Pooling with HikariCP Java JPA Basics: Entities, EntityManager and JPQL Java Hibernate Basics: SessionFactory, Session and HQL Package in Java: Basics Explained with Examples Create Package in Java: Step-by-Step Guide with Examples Import Package in Java: The import Statement Explained Access Control in Java: Packages, Classes and Members JAR File in Java: Create, Run and Inspect JAR Files Java Modules: Introduction to the Java Module System module-info in Java: Every Module Directive Explained Java Module Path: How --module-path Finds Your Modules Java Classpath: How -cp and CLASSPATH Find Your Classes Java Annotations: Basics of @ Metadata in Java Java Built-in Annotations: @Override, @Deprecated and More Java Custom Annotations: Create Your Own @interface Java Annotation Targets: @Target and ElementType Explained Java Reflection API: Inspect and Use Classes at Runtime Java Class Metadata: Names, Modifiers, Hierarchy and Generic Java Dynamic Objects: Create Objects Dynamically With Reflec Java Dynamic Proxy: Intercept Method Calls With Proxy and In Java Security Java Secure Coding Java Password Hashing Java Input Validation Java Cryptography Basics Java KeyStore Basics Java TLS Basics Java SecureRandom Java JUnit Basics Java JUnit Test Methods JUnit Assertions JUnit Test Fixtures JUnit Parameterized Tests Mockito in Java Java Mock Objects Java Integration Testing Java Code Coverage Maven in Java Create a Maven Project in Java Maven Dependencies Maven Plugins Gradle in Java Gradle Build Gradle Dependencies Build Executable JAR in Java Build WAR File in Java HTTP Basics in Java Java Servlet Basics Servlet Lifecycle in Java HttpServletRequest in Java HttpServletResponse in Java JSP in Java JSTL in JSP REST API in Java JSON in Java Java Web Application Spring Framework Basics Spring Boot Tutorial Spring MVC Spring Data JPA Spring Security Spring Boot REST API Jakarta EE Basics Java Deployment JAR Deployment Java WAR Deployment Run Java as a Service Docker Java: Dockerize a Java Application Java Environment Variables and Configuration Java Logging Basics Java Production Setup Java JVM Options Java JVM Monitoring Java Hello World App Java Calculator App Java Number Guess Game Java Student Manager Java Library System Java Bank App Java Todo App Java File Manager Java Quiz App Java REST API Project Java Chat Server Java Employee Manager Java E-commerce API
Ask about this post
AI Ask about this post

Ask questions about Java Library System and get answers drawn from it.

Signed-in readers only.