Java Date Format with Day Period: Pattern B Examples
Java date format with day period using pattern B in DateTimeFormatter (Java 16+). Print in the morning or at night, parse it and set custom ranges.
Java date format with day period using pattern B in DateTimeFormatter (Java 16+). Print in the morning or at night, parse it and set custom ranges.
Learn how Math.divideExact() in Java detects the Integer.MIN_VALUE / -1 overflow, how it handles zero, and how it compares to floorDivExact().
Java Math.abs() vs Math.absExact() with examples. Why Math.abs(Integer.MIN_VALUE) is negative, when absExact() throws, and safe alternatives.
Java string concatenation performance on JDK 25 with JMH results, how + compiles since JEP 280, why += in loops is slow, and concat() vs StringBuilder.
Java text block formatting with variables using formatted(), String.format(), MessageFormat and named placeholders, plus what happened to string templates.
Write a Java multiline string with text blocks, control indentation, line breaks and trailing spaces, and see the String.join() options for Java 8 to 14.
Learn to build an online Python editor (using Flask, Docker, and Kubernetes) that allows users to write and run Python code directly from the browser.
Learn Python list comprehension syntax with examples. Place if and if-else correctly, flatten lists, pair two lists with zip() and build dicts and sets.
In this chatGPT tutorial, explore the entire life cycle of fine-tuning models from preparing training data, creating a fine-tuned model, and using it programmatically.
Learn the basics of ChatGPT, the ChatGPT API for Python, and how to use it for creating and performing NLP tasks with examples.
Spring 6 Programmatic Validator API allows to add fine-grained validation rules beyond the capabilities of annotations-based declarative approach.
Since Spring 6.1, JdbcClient provides a unified client API for JDBC query and update operations, offering a more fluent and simplified interaction model.
Big O notation categorizes the efficiency of a given algorithm and describes the upper bound of the growth rate of a function as the input grows.
Capture a Java thread dump with jcmd, jstack, kill -3 or JSON for virtual threads, read every line and find deadlocks, CPU hogs and stuck pools.
Soft delete rows with Hibernate’s @SoftDelete: see the UPDATE that replaces DELETE, choose the DELETED, ACTIVE or TIMESTAMP strategy, read and restore deleted rows with native SQL, and avoid unique constraint errors.
Learn to retry the failed requests with Spring WebClient’s retry() and retryWhen() operators including retry on specific exception cases.
By utilizing the –tests option, we can run unit tests using Gradle from entire test suites to specific test classes or methods.
Make JUnit @BeforeAll and @AfterAll non-static with @TestInstance(PER_CLASS). Project default, @MethodSource, @Nested, shared state and parallel tests.
In Spring, the default naming strategy utilizes the named of annotated classes or methods. Learn to customize it by explicit or custom naming with examples.
SpringExtension integrates the Spring TestContext Framework into JUnit 5 Jupiter extension model, sets up the ApplicationContext, and manages dependencies.
The Maven error “release version 25 not supported” (or 21, 27) means the JDK that runs javac is older than maven.compiler.release. Learn how to check it with mvn -v and fix it with JAVA_HOME, toolchains, IntelliJ IDEA, GitHub Actions, Docker or Gradle, plus the maven-compiler-plugin setup for Java 21 and 25.
In Spring tutorial explores transaction-aware caching using transactionAware property and TransactionAwareCacheManagerProxy class with example.
Create and extract a JAR file with the jar command on Linux, macOS and Windows. Cheat sheet, runnable JARs, manifest, –dir and unzip options.
Install OpenJDK 25 on Linux, macOS and Windows with apt, dnf, Homebrew, winget or SDKMAN. Pick a build, set JAVA_HOME and verify java -version.
Learn to list Docker containers, customizing the output format and filtering containers based on their running/stopped status and names, etc.
Align text in columns in Java with printf widths, widths computed from the data, cut long values and a small TextTable class that prints Markdown tables.
This guide explores the step-by-step process of containerization and running a Spring Boot application with PostgreSQL database using Podman.
Learn to handle REST API timeouts on the server side using Spring boot MVC async, Resilience4j, @Transactional, RestTemplate and WebClient with examples.
Convert JSON array to list in Java with Jackson 3 TypeReference, Gson TypeToken and Org.json, including records, unknown fields and large files.
Use Java unnamed variables and patterns with _ in catch blocks, lambdas, loops and record patterns, and see where the underscore is a compile error.
Java scoped values are final in Java 25. Learn ScopedValue.where().run(), call(), rebinding, child threads and how scoped values compare with ThreadLocal.
Learn to send and receive Amazon SQS messages in a Spring Boot app with Spring Cloud AWS: SqsTemplate, @SqsListener, the endpoint property for LocalStack, processing more than 10 messages concurrently with maxConcurrentMessages, acknowledgement modes and FIFO queues.
Learn to integrate Kafka with Apache Avro and Schema Registry to manage the changes in Schema over time, and a demo to test this integration.
Top 30+ Git interview questions and answers providing a thorough exploration of essential concepts and practices within the Git version control system.
Math.ceil() vs floor() vs round() in Java explained with negative numbers, ties, return types, ceilDiv(), NaN edge cases and a rating example.
This Spring vs. Spring Boot tutorial lists the differences between Spring framework and Spring Boot based on general characteristics and features.
Learn about Feign Client and how to use it in a Spring Boot application. Also, learn the commonly used default Feign configurations and customizing them.
Iterator vs ListIterator vs Spliterator in Java compared in one table, with Enumeration, fail-fast rules, examples and when to use each cursor.
Learn NumPy basic concepts, constants, attributes and how to use NumPy for data visualization, followed by the advantages and limitations.
TypeScript exception handling uses try, catch, finally and throw, with an unknown catch variable under strict. Examples cover custom Error classes, cause, instanceof and async errors.
The map() method returns one result per element, while flatMap() can return zero, one or many and flattens them one level. Tested examples on TypeScript 7.0.2.
A Record types a plain object; a Map is a runtime collection. Compare them on keys, order, JSON, type checks and user input, and convert one into the other.
Record
Learn to use Spring WebMvcConfigurer to customize various aspects of Spring MVC, such as argument resolvers, view resolvers, exception handling, and more.
TypeScript checks types at compile time and outputs plain JavaScript; JavaScript checks them only at runtime. A side-by-side comparison with real compiler errors.
Learn to track or audit the @Entity creation and updation timestamps using Spring Data annotations, JPA lifecycle callbacks, Hibernate and Envers library.
Spring Boot WebClient example discusses sending HTTP POST requests, submitting form data and handling the response status, headers and body.
Learn to display images from different sources (e.g., resources directory or database) using the Thymeleaf view templates in a Spring Boot application.
Spring Boot is an open-source framework that simplifies the development of stand-alone, production-grade Spring-based MVC applications and microservices.
Java records cannot be used as the replacement for JPA entities because they restrict the byte code manipulation, generally required by frameworks to work.
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.