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

Java getResourceAsStream vs FileInputStream

Reading files is a common task in Java development, and understanding the various methods available can help us choose the most appropriate one for our use case. This article will explore three...

View Article


Protocol Buffers gRPC Differences

As software development evolves, the need for efficient data serialization and communication between services becomes increasingly crucial. Protobuf (Protocol Buffers) and gRPC are two technologies...

View Article


Using Java Streams to Determine Max and Min Dates in a List

Java Streams offer a powerful way to perform operations on collections of data. When working with a list of objects that contain date fields, we may need to use a Java list stream to find the maximum...

View Article

Define Multiple Repositories With Maven

Apache Maven is a powerful build automation tool primarily used for Java projects. It simplifies the process of managing project dependencies, builds, and documentation. One of Maven’s key features is...

View Article

Guide to FileWriter vs BufferedWriter

In Java, writing data to files is a common requirement, and the choice of the writer class can significantly impact performance. FileWriter and BufferedWriter are two popular classes used for writing...

View Article


Resolving PostgreSQL JSON Type Mismatch Errors in JPA

When working with PostgreSQL and Java Persistence API (JPA), you might encounter a common error related to JSON data types. This error often appears as: PSQLException: column is of type json but the...

View Article

Spring HTTP Clients: RestClient, WebClient, RestTemplate

Spring offers several HTTP clients to interact with RESTful services. This article delves into RestTemplate, WebClient, and the newer RestClient, comparing their features, strengths, and weaknesses to...

View Article

Spring AI Image Generation from Text Example

In today’s rapidly evolving technological landscape, integrating artificial intelligence (AI) into applications has become a key driver for innovation and efficiency. Spring AI Project is a powerful...

View Article


Show Every File on a Remote Server in Java

When working with remote servers, it is common to need to interact with the file system, such as listing files in a directory. In Java, several libraries allow us to establish an SSH connection and...

View Article


Java Array Minimum position – Finding the min element

Operations on arrays are essential, and we might need them in any application. Sometimes, they’re hidden behind more convenient interfaces like Collections API. However, this is the basic knowledge we...

View Article

Beyond Java Serialization: Exploring Alternative Approaches

Java Serialization, while a convenient tool for object persistence, has its limitations and potential drawbacks. In this article, we’ll delve into the reasons why you might want to reconsider using...

View Article

What’s New in Spring Boot 3? 5 Must-Have Features

Spring Boot 3 marks a significant milestone in the world of Java development. Packed with innovative features and enhancements, this latest version offers developers a more efficient, productive, and...

View Article

Unescape HTML Characters in Java

HTML entities are special characters reserved in HTML that need to be represented by a specific code. For instance, the less-than symbol “<” must be represented as “&lt;” in HTML. When working...

View Article


Using Apache POI to Extract Column Names From Excel

Apache POI is a powerful library that allows developers to work with Microsoft Office documents, including Excel files. Let us delve into understanding how Apache POI can be used to extract column...

View Article

Getting Started with Spring AI

Integrating artificial intelligence (AI) into applications is becoming necessary for businesses looking to stay ahead. The Spring Framework in the Java ecosystem brings AI capabilities to the forefront...

View Article


Java Remove All Characters Before Specific One Character

When working with strings in Java, we may encounter scenarios where we need to remove all characters before a particular delimiter or character. Fortunately, we can accomplish this task using various...

View Article

Getting the Insert ID in JDBC

When working with relational databases in Java, it’s common to perform insert operations and then retrieve the ID of the inserted record. This is especially important when dealing with auto-incremented...

View Article


Maven Spotless Plugin for Java

Maintaining a consistent code style across a project is crucial for readability, collaboration, and long-term maintainability. The Maven Spotless Plugin is an excellent tool for enforcing code style...

View Article

Spring Cloud Gateway: A Practical Approach

In the realm of microservices architecture, a gateway serves as a unified entry point for multiple microservices. It acts as a central point of control, routing requests to the appropriate services and...

View Article

Java Array: Count Distinct Elements Frequencies

In programming, one common task is counting the number of times a specific element appears in an array. This is a fundamental problem that can be solved in multiple ways depending on the language and...

View Article
Browsing all 745 articles
Browse latest View live