Recent Posts

JUnit 5 and Mockito Example

In this short tutorial, we’re going to explore how to use JUnit 5 and Mockito, a popular mocking framework for unit tests written in Java. 1. JUnit 5 and Mockito Dependencies 1.1. Maven Dependencies At first, let’s take a look at the Maven dependencies for JUnit 5:

Next, we’re going to include Mockito’s mockito–junit–jupiter, […]

0 comments

Remove Or Delete A Column Of A Data Frame In R

In this tutorial, we’re going to show how to remove or delete a column of a data frame in R. 1. Preparation Let’s create a data frame which will be used for all examples in this tutorial:

And let’s see it:

1. Delete A Column Of A Data Frame In R Directly To […]

0 comments

How To Sort Or Order A Data Frame In R

This tutorial is going to illustrate how to sort or order a data frame in R. 1. Preparation Let’s assume that we have a small data frame about books as follows, which will be used for all examples in this tutorials:

And let’s print out the dataset: 2. Order A Data Frame In R […]

0 comments

Spring Boot – How To Set Active Profiles

In this tutorial, we’re going to show how to set active profiles for Spring Boot applications. This is useful for us during application development and deployment. 1. Set Active Spring Profiles In The application.properties File We can set active profiles for Spring Boot applications in the application.properties file, as shown in the following example:

[…]

0 comments

Java 9 JShell – Execute And Exit A Script

JShell, which has been introduced since Java 9, is an interactively evaluates declarations, statements, and expressions of the Java programming language in a read-eval-print loop (REPL). This tutorial is going to show how to execute and exit a script with JShell. To learn more about JShell commands, please visit Java 9 JShell Cheat Sheet. 1. […]

1 comment

Create An Immutable Set In Java 9 By Static Factory Methods

In this tutorial, we’re going to get through how to create an immutable Set in Java 9 by using convenience static factory methods of the Set interface, which have been added into Java 9. 1. Create An Immutable Set In Java 9 By Static Factory Methods To create an immutable Set in Java 8, we […]

0 comments

Java 9 JShell – How To Import The External Library

This quick tutorial is going to cover how to import the external library into Java 9 JShell. 1. Setting The Class Path For Java 9 JShell 1.1. Start Java 9 JShell With –class-path Option To import the external library into Java 9 JShell, at first, we will need to set the class path for JShell […]

0 comments