Quantcast
Channel: Baeldung
Browsing all 3576 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Console I/O in Java

1. Introduction In this quick tutorial, we’ll demonstrate several ways to use a console for user input and output in Java. We’ll have a look at a few methods of the Scanner class for handling input,...

View Article


Calculate Age in Java

1. Overview In this quick tutorial, we’ll see how to calculate age using Java 8, Java 7 and Joda-Time libraries. In all cases, we’ll take the birth date and current date as input and return the...

View Article


Exception Handling in Java

1. Overview In this tutorial, we’ll go through the basics of exception handling in Java as well as some of its gotchas. 2. First Principles 2.1. What is it? To better understand exceptions and...

View Article

Java Weekly, Issue 236

Here we go… 1. Spring and Java >> Hands on MongoDB 4.0 transactions with Spring Data [spring.io] ACID transactions are now available when using a MongoDB replica set with Spring Data. Very...

View Article

How to Get the Size of an Object in Java

1. Overview Unlike C/C++ where we can use sizeof() method to get an object size in bytes, there’s no true equivalent of such method in Java. In this article, we’ll demonstrate how we can still get the...

View Article


Introduction to AWS Serverless Application Model

1. Overview In our previous article, we already implemented a full stack serverless application on AWS, using API Gateway for REST endpoints, AWS Lambda for business logic, as well as a DynamoDB as a...

View Article

Monitoring Disk Usage and Other Metrics in Java

1. Overview In this quick tutorial, we’ll be discussing how to monitor key metrics in Java. We’ll focus on disk space, memory usage, and thread data – using only core Java APIs. In our first example,...

View Article

Image may be NSFW.
Clik here to view.

Kotlin with Ktor

1. Overview Ktor is a framework for building asynchronous servers and clients in connected systems using the powerful Kotlin programming language. It facilitates developing a standalone application...

View Article


Image may be NSFW.
Clik here to view.

Spring Boot Integration Testing with Embedded MongoDB

1. Overview In this tutorial, we’ll learn how to use Flapdoodle’s embedded MongoDB solution together with Spring Boot to run MongoDB integration tests smoothly. MongoDB is a popular NoSQL document...

View Article


Image may be NSFW.
Clik here to view.

Reflection with Kotlin

1. Introduction Reflection is the name for the ability to inspect, load and interact with classes, fields, and methods at runtime. We can do this even when we don’t know what they are at compile time....

View Article

Image may be NSFW.
Clik here to view.

Encrypting and Decrypting Files in Java

1. Overview In this tutorial, we’ll take a look on how to encrypt and decrypt a file using existing JDK APIs. 2. Writing a Test First We’ll start by writing our test, TDD style. Since we’re going to...

View Article

Image may be NSFW.
Clik here to view.

Guide to Resilience4j

1. Overview In this tutorial, we’ll talk about the Resilience4j library. The library helps with implementing resilient systems by managing fault tolerance for remote communications. The library is...

View Article

Image may be NSFW.
Clik here to view.

How to Set a Header on a Response with Spring 5

1. Overview In this quick tutorial, we’ll go through different ways of setting a header on a service response, either for non-reactive endpoints or for APIs using Spring’s 5 WebFlux framework. We can...

View Article


Image may be NSFW.
Clik here to view.

Create a Symbolic Link with Java

1. Overview In this tutorial, we’ll explore different ways of creating a symbolic link in Java using the NIO.2 API, and explore the differences between hard and soft file links. 2. Hard vs...

View Article

Image may be NSFW.
Clik here to view.

Building a Microservice with Apache Meecrowave

1. Overview In this tutorial, we’ll explore the basic functionality of the Apache Meecrowave framework. Meecrowave is a lightweight microservices framework from Apache, which works very well with CDI,...

View Article


Image may be NSFW.
Clik here to view.

An Introduction to the Theory of Big-O Notation

1. Introduction In this article, we’ll give an introduction to the mathematics of big-O notation, as well as show an example of a big-O proof. 2. Formal Definition Definition: f(x) = O(g(x)) means...

View Article

Image may be NSFW.
Clik here to view.

Java Global Exception Handler

1. Overview In this tutorial, we’ll focus on the Global Exception Handler in Java. We’ll first discuss the basics of the exceptions and the exception handling. Then we’ll have a comprehensive look on...

View Article


Image may be NSFW.
Clik here to view.

Image to Base64 String Conversion

1. Overview In this quick tutorial, we’re going to cover how to encode image file to a Base64 String, then decode it to retrieve the original image using Apache Common IO and Java 8 native Base64...

View Article

Image may be NSFW.
Clik here to view.

Context and Servlet Initialization Parameters

1. Overview Servlets are plain Java classes that run in a servlet container. HTTP servlets (a specific type of servlet) are first class citizens in Java web applications.  The API of HTTP servlets is...

View Article

Image may be NSFW.
Clik here to view.

Create a Java and Kotlin Project with Maven

1. Introduction In this quick tutorial, we’ll see how to set up a Maven project handling both Java and Kotlin sources. We’ll first create a project for Java sources only. We’ll then add the...

View Article
Browsing all 3576 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>