Skip to main content

103 docs tagged with "concept"

View all tags

Abstraction

Hide complexity behind a clean contract — when to use abstract classes vs. interfaces, default methods, and the design forces that govern the choice.

API Contract

The single REST endpoint, full request and response shapes, Bean Validation rules, and what happens when validation fails.

API Design

Principles and patterns for designing clear, versioned, and client-friendly REST, gRPC, and GraphQL APIs in Java/Spring Boot services.

Arrays

Single and multi-dimensional arrays, creation, initialization, traversal, and the Arrays utility class.

Atomic Variables

Lock-free thread-safe operations using AtomicInteger, AtomicReference, LongAdder, and the compare-and-swap (CAS) CPU primitive that powers them.

Bean Lifecycle

The complete lifecycle of a Spring bean — from instantiation and dependency injection, through initialization callbacks, to destruction — and how to hook into each stage.

Bean Scopes

How Spring's bean scopes — singleton, prototype, request, session, and application — control when beans are created, how many instances exist, and how they interact with each other.

Branching Strategies

A comparison of Git Flow, GitHub Flow, and trunk-based development — what each model is, when to use it, and how it shapes your CI/CD pipeline.

Bytecode & .class Files

The structure of Java .class files — constant pool, bytecode instructions, and using javap to disassemble compiled code — plus how generics erasure, lambdas, and string concatenation look at the bytecode level.

Class Loading

How the JVM loads, links, and initializes classes on demand — the parent-delegation model, the three standard classloaders, and how frameworks use custom classloaders for isolation and hot reload.

Classes & Objects

Understand Java classes as blueprints and objects as runtime instances — fields, methods, constructors, and the `this` keyword.

Collections Hierarchy

The complete interface tree of the Java Collections Framework — Iterable, Collection, List, Set, Queue, and why Map stands apart.

Collectors

Java's built-in Collector implementations — toList, groupingBy, partitioningBy, joining, toMap, counting, and how to build custom collectors.

Conflict Resolution

How Git detects and marks merge conflicts, what three-way merge means, how to resolve conflicts efficiently with rerere and merge tools, and strategies to avoid them in the first place.

Control Flow

if/else, switch expressions, for, while, do-while, break, continue — directing program execution in Java.

Custom Exceptions

How to create domain-specific exception classes in Java — checked vs. unchecked choice, adding context fields, exception chaining, and hierarchy design.

Dependency Injection

How Spring's container wires beans together using constructor, setter, and field injection, and when to use @Autowired, @Qualifier, and @Primary.

Distributed Systems

Core theory behind distributed systems — CAP theorem, consistency models, idempotency, and the Saga pattern for distributed transactions — for Java/Spring Boot backend engineers.

Domain Model

The entities, DTOs (Java Records), and enums that represent the core concepts of a loan application — and why each was designed the way it was.

Encapsulation

Hide internal state behind a controlled interface — access modifiers, getters/setters, and the art of designing immutable classes.

Exception Best Practices

Production-proven rules for when to throw, catch, wrap, and log exceptions in Java — covering the checked vs. unchecked debate, layered architecture patterns, and common anti-patterns.

Exception Handling

How GlobalExceptionHandler uses @RestControllerAdvice to intercept validation failures and unexpected errors and convert them into structured JSON responses.

Exception Hierarchy

The Throwable tree in Java — how Error, Exception, and RuntimeException relate, and what checked vs. unchecked means for API contracts.

Functional Interfaces

What functional interfaces are, the built-in types (Function, Predicate, Consumer, Supplier), and how to compose them.

Garbage Collection

How the JVM automatically reclaims heap memory — GC roots, reachability analysis, generational collection, and the major collectors (Serial, Parallel, G1, ZGC) with tuning flags.

Generics

How Java generics provide compile-time type safety through parameterised types — covering generic classes, generic methods, bounded type parameters, and the key constraint that generics only work with reference types.

Git Basics

The foundational Git concepts every developer needs — the three-area model, core commands, branching, .gitignore, and the daily workflow from init to push.

Git Object Model

How Git stores every file, directory, and commit as content-addressable objects — blobs, trees, commits, and tags — and why this design makes Git so powerful and reliable.

Hibernate Basics for Spring Boot Developers

The Hibernate internals every Spring Boot developer must understand — SessionFactory vs Session thread safety, entity states, dirty checking, first-level cache, second-level cache, and LazyInitializationException.

HTTP Fundamentals

A deep dive into the HTTP protocol — methods, status codes, headers, content negotiation, and HTTP/2 basics — as used in Java backend development.

Immutable Collections

How to create truly immutable List, Set, and Map instances in Java using the Java 9+ factory methods and how they differ from the older Collections.unmodifiable wrappers.

Indexes & Query Performance

How database indexes work, when to add them, how to read EXPLAIN plans, and common indexing pitfalls that hurt performance.

Inheritance

Extend classes with `extends`, override behavior with `@Override`, use `super` for parent delegation, and learn when inheritance causes more harm than good.

IoC Container

How Spring's Inversion of Control container manages bean definitions, wires dependencies, and controls object lifecycle using ApplicationContext and BeanFactory.

Iterators and the for-each Loop

How the Iterator protocol works, what ConcurrentModificationException means and how to avoid it, and how the enhanced for-each loop is compiled.

java.util.concurrent

The high-level concurrency toolkit — ExecutorService, Future, CompletableFuture, CountDownLatch, CyclicBarrier, and Semaphore — that replaces manual thread management in production Java.

JIT Compilation

How the JVM's Just-In-Time compiler converts hot bytecode into native machine code at runtime — tiered compilation (C1/C2), inlining, escape analysis, and the warmup behavior you see in every production service.

JPA Basics — Entity Mapping and Relationships

How to map Java classes to database tables using @Entity, @Id, @GeneratedValue, and relationship annotations (@OneToMany, @ManyToOne), including fetch type defaults and their implications.

JVM Memory Model (Runtime Data Areas)

The JVM's runtime memory layout — heap regions, stack frames, Metaspace, and per-thread vs. shared areas — and why understanding it matters for diagnosing OutOfMemoryErrors and tuning performance.

JWT Authentication in Spring Security

JSON Web Token structure, signing (symmetric vs. asymmetric), validation, and how to wire stateless JWT authentication into a Spring Boot REST API using Spring Security's OAuth2 Resource Server support.

Lambdas

Lambda expressions in Java — syntax, effectively-final capture, `this` behavior, and how they relate to functional interfaces.

List — ArrayList vs LinkedList

Understand Java's List interface, when to use ArrayList vs LinkedList, and how their internal structures drive performance trade-offs.

Locks

Explicit locking with ReentrantLock, ReadWriteLock, and StampedLock — when and why to reach for them over synchronized.

Math and StrictMath

Java's Math and StrictMath classes — trigonometry, rounding, overflow-safe arithmetic, random numbers, and when cross-platform reproducibility matters.

Method References

The four kinds of method references in Java — static, bound instance, unbound instance, and constructor — and when to prefer them over lambdas.

Methods

Method signatures, overloading, varargs, pass-by-value semantics, and recursion in Java.

Microservices

An architectural style that structures an application as a collection of small, independently deployable services — each owning its data and business logic.

MySQL, PostgreSQL & H2 — Database Guide

Practical guide to MySQL, PostgreSQL, and H2 for Java developers — architecture differences, UUID handling, H2 for development, and migration paths to production databases.

NoSQL Trade-offs

CAP theorem, BASE properties, and when to choose Redis, MongoDB, Cassandra, or Elasticsearch over a relational database.

OAuth2 and OpenID Connect in Spring Security

OAuth2 authorization flows, the resource server and authorization server patterns, OpenID Connect identity layer, and how to configure Spring Boot as an OAuth2 client and resource server.

Object Class

The root of every Java class hierarchy — toString, equals, hashCode, clone, wait, notify, and finalize explained with contracts and pitfalls.

Operators & Expressions

Arithmetic, relational, logical, bitwise, ternary, and instanceof operators — how Java evaluates expressions.

Optional (Java 8+)

Java's Optional container type — what it is, when it genuinely clarifies code, and the common anti-patterns that make it worse than a null check.

Optional Deep Dive

How to use Optional correctly — creation, retrieval patterns, chaining, and the anti-patterns that make Optional worse than null.

Packages & Imports

Package structure, the import statement, the classpath, access modifiers, and how Java locates classes.

Parallel Streams

When parallel streams improve throughput, when they hurt, and how the ForkJoin common pool governs parallel execution.

Persistence Layer

How LoanApplication is mapped to H2 using JPA @Embeddable value objects, @ElementCollection for rejection reasons, and @PrePersist for UUID generation.

Polymorphism

Compile-time (overloading) vs. runtime (overriding) dispatch — how Java decides which method to call and why this is the foundation of flexible design.

Primitives vs. Objects

How Java's eight primitive types differ from object references — stack vs. heap, null safety, autoboxing, unboxing, and the performance tradeoffs involved.

Project Overview

What the Loan Application Evaluator does, why it exists, its tech stack, and how to run it locally.

Rebase vs. Merge

The difference between git merge and git rebase — when each produces a better history, how interactive rebase cleans up commits, and the golden rule you must never break.

Records (Java 16+)

Java's concise immutable data carrier — understand what records generate automatically, compact constructors, and when records replace traditional value classes.

REST Design

How to design clean, coherent REST APIs — resource naming, HTTP verb mapping, versioning strategies, HATEOAS, and idempotency patterns used in production Spring Boot services.

Sealed Classes (Java 17+)

Restrict which classes can extend or implement a type — enabling exhaustive pattern matching and modeling closed, well-known type hierarchies safely.

Service & Business Logic

How the LoanApplicationService evaluates a loan — risk classification, interest rate calculation, EMI formula, and the two-tier eligibility check — step by step.

SOLID Principles

Five design principles that make object-oriented code easier to maintain, extend, and test — the foundation of clean Java design.

Sorting and Ordering — Comparable vs Comparator

Understand the difference between Comparable (natural ordering defined on the class) and Comparator (external ordering strategy), and how to use both with collections, streams, and sorted data structures.

Spring AOP

How Spring's Aspect-Oriented Programming model applies cross-cutting concerns — logging, transactions, security, caching — using proxies, pointcuts, and advice without touching business logic.

Spring Boot Auto-Configuration

How Spring Boot uses @EnableAutoConfiguration and @ConditionalOn* annotations to wire beans automatically based on what is on the classpath.

Spring Boot Starters

What starters are, how they bundle dependencies and trigger auto-configuration, and what the most common starters wire up in a Spring Boot application.

Spring Boot Testing

How to test Spring Boot applications using @SpringBootTest, test slices (@WebMvcTest, @DataJpaTest), @MockBean, and Testcontainers for integration tests with real infrastructure.

Spring Data Caching

How Spring's cache abstraction works with @Cacheable, @CacheEvict, @CachePut, and @Caching, plus integrating Caffeine and Redis as backing stores.

Spring Data Projections

How to use interface projections, DTO projections, and dynamic projections in Spring Data JPA to select only the columns you need in a single optimized query.

Spring Data Repositories

How Spring Data JPA's repository interfaces (CrudRepository, JpaRepository) eliminate DAO boilerplate through query method derivation and @Query for JPQL and native SQL.

Spring Events

How Spring's ApplicationEventPublisher and @EventListener provide a decoupled, in-process observer pattern for reacting to application state changes — including async and transactional event variants.

Spring MVC

How Spring MVC processes HTTP requests — DispatcherServlet, @RestController, request mapping, parameter binding, and ResponseEntity patterns used in everyday Spring Boot APIs.

Spring Security Authentication

How Spring Security authenticates users — UserDetailsService, PasswordEncoder, AuthenticationManager, and the authentication flow from credentials to SecurityContext.

Spring Security Authorization

How Spring Security enforces access control — URL-based rules with requestMatchers, method-level security with @PreAuthorize and @Secured, and the role vs. authority distinction.

Spring Security Filter Chain

How Spring Security's ordered chain of servlet filters intercepts every HTTP request and applies authentication and authorization before the request reaches your controller.

SQL Fundamentals

Core SQL syntax and concepts — SELECT, JOIN types, GROUP BY, window functions, and subqueries — with Spring Boot JDBC context.

Streams API

How Java streams work — pipeline anatomy, lazy evaluation, intermediate vs. terminal operations, and common pitfalls.

Strings

String immutability, the string pool, StringBuilder, and the most useful String APIs in Java.

Synchronization

How Java's synchronized keyword, intrinsic locks, volatile, and the happens-before relationship prevent race conditions in multithreaded programs.

Testing Strategy

How LoanApplicationService is unit-tested with JUnit 5 and Mockito — covering risk classification, EMI calculation, and all eligibility rules using @Nested test classes.

Threads & Lifecycle

What a Java thread is, how to create one, and the six lifecycle states a thread transitions through from creation to termination.

Transactions & ACID

Database transactions, the four ACID properties, isolation levels, and how deadlocks occur — with Spring @Transactional context.

Transactions and @Transactional

How Spring's @Transactional works under the hood with AOP proxies, propagation levels, isolation levels, readOnly optimization, rollback rules, and the self-invocation trap.

try / catch / finally

How to throw, catch, and clean up after exceptions in Java — covering multi-catch, finally guarantees, and the try-with-resources statement.

Type Conversion

How Java converts values between types — widening, narrowing, implicit promotion, and explicit casting.

Type Erasure

How the Java compiler removes all generic type information before producing bytecode, why this design choice was made for backward compatibility, and what limitations it imposes at runtime.

Type Inference

How the Java compiler deduces types automatically — covering the diamond operator, generic method type inference, `var` (Java 10+), and lambda target typing — and where inference has limits.

Variables & Data Types

The 8 primitive types, reference types, literals, constants, and the final keyword in Java.

Virtual Threads (Java 21+)

Project Loom's virtual threads — how they work, how they remove the scalability ceiling of thread-per-request servers, and what pinning and structured concurrency mean for your code.

Wait / Notify

How Object.wait(), notify(), and notifyAll() coordinate threads using the intrinsic monitor — including the spurious wakeup rule and when to use each method.

WebFlux & Reactive Programming

Spring WebFlux — the reactive, non-blocking alternative to Spring MVC — covering Mono, Flux, functional endpoints, backpressure, and when to choose reactive over the blocking model.

Wildcards

How Java's wildcard type arguments — `?`, `? extends T`, and `? super T` — express variance in generic APIs, and how the PECS rule guides correct usage.

Working with Remotes

How Git remotes work under the hood — fetch vs. pull, push, remote-tracking branches, upstream conventions, and collaborating safely with a team via GitHub or GitLab.

Wrapper Classes

Java's eight primitive wrapper types — Integer, Long, Double, and friends — covering autoboxing, caching traps, parsing, and when to use primitives vs objects.