Isomorphic Strings in Java: Algorithm, Code and Examples
Two strings are isomorphic when a one-to-one character mapping turns one into the other. Learn the algorithm and check it in Java with arrays or two HashMaps.
Two strings are isomorphic when a one-to-one character mapping turns one into the other. Learn the algorithm and check it in Java with arrays or two HashMaps.
Spring Authorization Server issues OAuth2 access tokens and OpenID Connect ID tokens from our own Spring Boot application. This tutorial builds an authorization server and a resource server on Spring Boot 4.1, with client_credentials and PKCE clients, key rotation, custom claims, JDBC client storage, MockMvc tests and real curl output.
Thymeleaf renders server-side HTML pages from natural templates in a Spring Boot application. This tutorial builds a playlist app on Spring Boot 4.1.1 and Thymeleaf 3.1.5 with loops, conditions, links, validated forms, fragments, i18n and date and number formatting, and tests the views with MockMvcTester.
Embabel tutorial for Spring Boot 4: build a GOAP-planned agent with @Action, conditions and tools, run it on Ollama and test it without an API key.
ArchUnit checks the structure of Java code, such as layers, package cycles, naming and Spring annotations, inside ordinary JUnit 6 tests. This tutorial sets up archunit-junit6 1.5.1, writes layered, onion and Spring Boot rules, reads real failure messages and freezes rules for legacy code.
AssertJ is a Java assertion library where we chain readable checks on assertThat(actual) and get failure messages that name the exact difference. This tutorial covers strings, numbers, collections, maps, Optional, exceptions, records, java.time, soft assertions, custom assertions and MockMvcTester in Spring Boot, with a cheat sheet table.
Spring Cloud Gateway puts one entry point in front of our microservices and routes each request with predicates and filters. This tutorial builds a complete gateway on Spring Boot 4.1 with YAML and Java routes, Redis rate limiting, retry, a Resilience4j circuit breaker, CORS, WireMock tests and the actuator endpoints.
A module import declaration such as import module java.base; imports every package a module exports with one line, and it is final in Java 25. Learn what it imports, how to fix “reference to List is ambiguous” with a single-type import, and how it works with java.se and compact source files.
TypeScript utility types create new types from an existing one, such as an all-optional copy or a subset of keys. This reference lists all 22 built-in utility types with their results, gives one example each for Partial, Pick, Omit, Record, Exclude, ReturnType and Awaited, and shows the real tsc errors we get when we use them wrong.
java.lang.NoSuchMethodError means code compiled against one version of a class runs with another version that lacks the called method. Learn to read the message, find the wrong jar with mvn dependency:tree, -verbose:class and javap, and fix the conflict with a BOM, an exclusion and the Enforcer dependencyConvergence rule.
A StackOverflowError means a thread made more nested calls than its stack can hold. Learn to read the repeating stack trace, fix missing base cases, deep recursion and object cycles in toString(), Lombok and Jackson, and when -Xss helps.
IllegalArgumentException is the unchecked exception a Java method throws when an argument has a value it does not accept. This post lists the JDK calls that throw it with their real Java 25 messages and the fix for each, the subclasses such as NumberFormatException, and when our own code should throw it instead of IllegalStateException or NullPointerException.
The TypeScript satisfies operator checks a value against a type and keeps the narrow type TypeScript inferred for it. We compare satisfies with type annotations and as assertions, use it on settings objects, Record maps and as const tables, and read the real tsc errors for the common mistakes.
Spring Boot microservices are small Spring Boot applications that each own one business capability and call each other over the network. This tutorial builds a complete library system on Spring Boot 4.1 with Spring Cloud Gateway, HTTP interface clients, Resilience4j retry and circuit breaker, OpenTelemetry tracing with one trace id across services, Docker Compose and WireMock tests, and explains when not to use microservices.
A CompletableFuture is a Future that runs the next step when its result arrives, so no thread has to wait for it. This tutorial creates, chains and combines CompletableFuture tasks on virtual threads, handles errors and timeouts, and shows the mistakes that make async code hang or lose exceptions.
A TypeScript decorator is a function that we put above a class or class member with @name, and it can replace that member with a new version. Learn each decorator kind with runnable TypeScript 7 examples, the order decorators run in, the usual compiler errors, and how standard decorators differ from experimentalDecorators used by Angular, NestJS and TypeORM.
Kafka queues let many consumers in a share group read the same partition and acknowledge each record on its own. This guide compares share groups with consumer groups, lists the status in Kafka 4.x and the broker settings, and builds a Spring Kafka share consumer with acknowledge, release and reject.
Spring Boot 4 is the major release built on Spring Framework 7, Jakarta EE 11 and Jackson 3, with Java 17 as the minimum. This tutorial builds one Spring Boot 4.1.1 app that shows the modular starters, JSpecify null-safety with NullAway, API versioning, HTTP service clients with @Retryable, Jackson 3, MockMvcTester and RestTestClient tests, virtual threads, OpenTelemetry traces and the 4.1 additions, and ends with an upgrade checklist from Spring Boot 3.5.
TypeScript 6 is the last TypeScript release with a JavaScript-based compiler. It changes tsconfig.json defaults such as strict and types, and deprecates options that TypeScript 7 removes. This overview lists every change with the real tsc errors and an upgrade checklist for 5.x projects.
TypeScript 7 is the Go port of the TypeScript compiler and checks the same language as TypeScript 6 about 10 times faster. We compare both versions in a table, time tsc 6.0.3 and tsc 7.0.2 on the same project, and show what still needs TypeScript 6 and how to switch.
Spring Framework 7 keeps Java 17 but moves to Jakarta EE 11, JSpecify null-safety and Jackson 3. This overview lists every notable change in a summary table and shows the main new features, such as @Retryable, API versioning and BeanRegistrar, with short examples.
Jackson 3 moves to the tools.jackson group id and packages, makes JsonMapper immutable and replaces the checked JsonProcessingException with JacksonException. This guide shows each change with a short snippet, the changed defaults side by side, how Spring Boot 4 uses Jackson 3, and a migration checklist.
Gradle 9 needs Java 17 or newer to run, builds scripts with Kotlin 2 and Groovy 4, and removes the APIs that Gradle 8 deprecated. This overview lists the main changes from 9.0 to 9.8.0, builds a Java 25 project with the Gradle 9 wrapper, and fixes the most common upgrade errors.
Mockito 5 creates mocks for a class’s dependencies and mocks final classes and static methods with mockito-core alone. This tutorial sets up Mockito 5.24.0 with JUnit 6 on Java 25, including the Java agent setup, and covers stubbing, verify, matchers, captors, spies, mockStatic and the strict stubs errors.
Spring Security 7 ships with Spring Boot 4 and removes the APIs deprecated in 6.x, such as and() chaining and AntPathRequestMatcher. This overview lists every change in one table, explains each one briefly with snippets for the main ones, and ends with a migration checklist from 6.x.
A Java 25 migration is mostly a build change. This step-by-step guide upgrades a Maven project from Java 21 to Java 25, shows the support dates, and fixes the real errors from Lombok, Mockito and JaCoCo on the way.
Java 25 is the LTS release of September 2025 with 18 JEPs. This guide runs every one of them, from compact source files, module imports, flexible constructors and scoped values to compact object headers, AOT caches and the new JFR events, and shows the preview features with their –enable-preview flags. It ends with the features that became final between Java 21 and 25 and a migration checklist.
Java 26 (JDK 26) shipped on 17 March 2026 as a non-LTS release with 10 JEPs. This overview lists every JEP with its status and shows short, runnable examples for HTTP/3, final field warnings, the AOT cache with ZGC and the preview APIs.
Java 27 (JDK 27) reached general availability on 15 September 2026 with nine JEPs. Four final JEPs change JVM defaults (G1 everywhere, compact object headers, post-quantum TLS, JFR redaction), and five continue as previews or incubator. A summary table, one example per feature and the removed options.
Initialize a Java List in one line with List.of() for an unmodifiable list, or new ArrayList<>(List.of(…)) when the list changes later. Compare Arrays.asList(), Stream.toList(), Collections and Guava by mutability and null support.
Maven 4 separates the build POM from the published consumer POM, which brings POM model 4.1.0, subprojects, inferred versions, BOM packaging and new lifecycle phases. Maven 4.0.0 is still a release candidate (4.0.0-rc-7), so this guide builds the same project with Maven 3.9.16, 3.10.0 and 4.0.0-rc-7, shows what fails and walks through the migration with mvnup.
30 Java interview questions for developers with about 5 years of experience, each with a direct answer, the reason behind it and a runnable Java 25 snippet. Covers collections internals, concurrency, Java 21 to 25 features, JVM memory and GC, streams, design, Spring @Transactional pitfalls and small system design tasks.
“Unsupported class file major version 69” means a JVM or bytecode tool older than Java 25 tried to read a Java 25 class file. Learn to read the class file version, map it to the Java release, and fix the error by upgrading the runtime, compiling with –release, or upgrading Gradle, Spring, JaCoCo, Mockito and Lombok.
Schedule jobs in Spring Boot 4 with Quartz 2.5: inject Spring beans into jobs, use simple and cron triggers, handle misfires, chain jobs with listeners, persist and cluster jobs with the JDBC job store, and manage them from the actuator endpoint.
Connect Spring Boot 4.1 to Elasticsearch 9 with Spring Data Elasticsearch 6.1 and the new Java client: run Elasticsearch in Docker, map documents, search with repositories and NativeQuery, and test with Testcontainers.
A hands-on Kubernetes guide for Java developers: deploy a Spring Boot API and PostgreSQL to a local kind cluster and learn pods, Deployments, Services, Ingress, ConfigMaps, Secrets, volumes and StatefulSets with real kubectl output.
Upload an .xlsx class roster to a Spring Boot endpoint, read it with Apache POI, validate every row with Bean Validation and save the valid rows in JDBC batches. Includes a JSON error report, duplicate checks, a SAX reader for large files with measured heap, upload limits and MockMvc tests.
Set up Hibernate 7.4 in a Spring Boot 4.1 application: the JPA starter, datasource and JPA properties, entities, Spring Data repositories, transactions, the Session API, SQL logging, tests on H2 and MySQL, and the Hibernate 7 upgrade changes.
A shared Random is thread-safe but makes every thread fight over one seed. Learn which generator each thread should use, how to keep seeded results reproducible, and what a JMH benchmark measured on Java 25.
Spring Boot @Autowired connects the classes together without tight coupling, making application modular, testable, and easy to maintain.
Learn to fix MySQL error #1194 (“Table is marked as crashed”) with Stellar Repair for MySQL. Read this detailed guide for step-by-step repair process. Discover how to quickly restore corrupted MySQL tables with minimal data loss.
JUnit @AutoClose closes test fields after each test or class. Learn custom close methods, static vs instance timing, PER_CLASS, null and failing close().
JUnit version with Spring Boot explained. Spring Boot 4.1.1 manages JUnit 6.0.3; override it with junit-jupiter.version and test with @WebMvcTest.
JUnit 6 nullability explained with JSpecify @NullMarked and @Nullable, the annotated JUnit API, NullAway compile errors and the assertNotNull() contract.
Set up the JUnit Gradle dependency with junit-bom, junit-jupiter and the launcher in Gradle 9, filter tests, add integration tests and fix common errors.
Add the JUnit Maven dependency with junit-bom 6.1.3, junit-jupiter and Surefire 3.6.0, run one test, add Failsafe and fix version errors in pom.xml.
JUnit 6 tutorial with a Maven project, a first test with assertions, mvn test runs, a failure report explained and what changed from JUnit 5.
Spring AI CallAdvisor and StreamAdvisor provide hooks to wrap around LLM invocations, both for synchronous and streaming scenarios.
Angular UI testing in Java with Selenide and JUnit 5. Wait for spinners without explicit waits, handle timeouts and failures, and add Allure reports.
The innodb_force_recovery option starts MySQL in a recovery mode that lets the InnoDB storage engine run on a corrupted database, so we can dump the data before we rebuild the damaged tables. When innodb_force_recovery is not working, the cause is either a problem in the option file or corruption that …
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.