Quantcast
Channel: Java Archives - Java Code Geeks
Browsing all 743 articles
Browse latest View live

Converting UTF-8 to ISO-8859-1

1. Introduction ISO 8859 is an eight-bit extension to ASCII developed by the International Organization for Standardization (ISO). ISO 8859 includes the 128 ASCII characters and additional 128...

View Article


Write Like a Pro: Avoiding Beginner Java Mistakes

Welcome, aspiring Java developers! The road to mastering Java is paved with exciting challenges and powerful tools. But even the most seasoned programmers have encountered beginner mistakes along the...

View Article


REST API Security with Spring Security JWT Token Signing

Securing REST APIs is important in today’s web development, especially with microservices becoming more common. A popular way to do this is with JSON Web Tokens (JWT). Spring Security helps with...

View Article

Representation of RGB color in Java

The RGB color model finds extensive application across diverse platforms and devices due to its compatibility with electronic display mechanisms. Within RGB, ‘R’ signifies Red, ‘G’ denotes Green, and...

View Article

Date Check Equals Yesterday

When handling date and time information in Java applications, it’s frequently essential to assess dates for different reasons like scheduling tasks, setting reminders, or generating reports. A typical...

View Article


A Guide To Jackson-jr Library

1. Introduction JavaScript Object Notation (JSON) is a text-based format for storing and exchanging data. It’s commonly used by web developers to transfer data between a server and a web application....

View Article

Creating PostgreSQL Schema Before Liquibase Execution

1. Enhancing PostgreSQL Schema Management In PostgreSQL database management, organizing database entities into separate schemas is a best practice for maintaining clarity and security in multi-tenant...

View Article

Java Arrays Tutorial

1. Introduction In computer programming, an array is a collection of items stored in contiguous memory locations. In Java, an array is a data structure that stores multiple values of the same data type...

View Article


Parse HTML Table With Jsoup

Jsoup, an open-source library, serves the purpose of scraping HTML pages by offering an API for parsing, extracting, and manipulating data through DOM API methods. Let us delve into understanding how...

View Article


How to Compare Collections for Object Storage in Java

In Java, you can store groups of objects using collections. These collections act like containers, but each one has its own way of organizing the objects inside. Choosing the right collection depends...

View Article

InputStream vs. InputStreamReader in Java

Working with data streams in Java is fundamental for interacting with files, network connections, and other sources. Among the key components in Java’s I/O framework are the InputStream and...

View Article

Setter Methods vs Constructors for Setting Variables in Java

In object-oriented programming (OOP) with Java, the decision to employ setter methods or constructors for setting variables is pivotal. Both mechanisms serve the purpose of initializing object states,...

View Article

Commit Offsets in Kafka

Apache Kafka is an open-source stream-processing software platform developed by the Apache Software Foundation. Kafka uses topics, partitions, and replication to manage data organization, parallel...

View Article


Null No More: Mastering Java’s Most Common Error

Ah, the NullPointerException. It strikes fear into the heart of even the most seasoned Java developer. This infamous error message can bring your program screeching to a halt, leaving you staring at a...

View Article

Implement Two-Level Cache With Spring

Caching is a technique used to store data temporarily in a faster storage layer to improve the performance and responsiveness of applications. Let’s explore how to implement a two-level cache in...

View Article


Autowire Spring Bean in Servlet Filter

Servlet filters provide a powerful way to intercept and manipulate incoming requests. However, accessing Spring-managed beans within these filters can be challenging. Let us delve into understanding...

View Article

Spring Prototype Beans with Runtime Arguments

Spring offers various bean scopes, with the default being singleton, which creates a single instance throughout the application. Prototype scope, on the other hand, creates a new instance every time...

View Article


Refresh and Fetch an Entity After Save in Spring Data JPA

The Java Persistence API (JPA) serves as a connector linking Java objects and relational databases, facilitating the smooth persistence and retrieval of data. Let us delve into understanding how to...

View Article

Capture Method Arguments in Mockito Test

During code testing, we may need to capture the method parameters. Let us delve into understanding how Mockito captures passed parameters. 1. Introduction JUnit is a powerful and widely used testing...

View Article

Intro to the Apache Commons CLI

The Apache Commons CLI library is a powerful tool that enables developers to efficiently create command line interfaces (CLIs) for software applications. This framework streamlines the development...

View Article
Browsing all 743 articles
Browse latest View live