-
Ehcache Logging example
Ehcache is using SLF4j logging, to log stuff, put a slf4j implementation in the project classpath, in this example, we use logback.
Date: 2019-08-17 View: 1520
-
Ehcache hello world example
In this tutorial, we will show you two examples to help you getting started with Ehcache.
Date: 2019-08-17 View: 1520
-
Java Get number of available processors
A code snippet to show you how to get the number of available processors / cores / CPUs in your environment.
Date: 2019-08-17 View: 1520
-
Gradle Create Java project structure automatically
To quick start a new Gradle Java project, type gradle init --type java-library
Date: 2019-08-17 View: 1520
-
Java Math.pow example
A simple Math.pow example, display 2 to the power of 8.
Date: 2019-08-17 View: 1520
-
Java Display double in 2 decimal places
In Java, there are few ways to display double in 2 decimal places.
Date: 2019-08-17 View: 1520
-
Java Convert String to int
In Java, you can use Integer.parseInt() to convert a String to int.
Date: 2019-08-17 View: 1520
-
Spring Mixing XML and JavaConfig
Spring examples to show you how to mix both Spring XML and JavaConfig together.
Date: 2019-08-17 View: 1520
-
Tomcat 7 + Java 8 : Invalid byte tag in constant pool: 15
Just upgraded to Java 8, and the Tomcat 7 keeps prompting the following exceptions:
Date: 2019-08-17 View: 1520
-
Java 8 Lambda : Comparator example
In this example, we will show you how to use Java 8 Lambda expression to write a Comparator to sort a List.
Date: 2019-08-17 View: 1520
-
Java Generate random integers in a range
In this article, we will show you three ways to generate random integers in a range.
Date: 2019-08-17 View: 1520
-
Java 8 forEach examples
In this article, we will show you how to loop a List and a Map with the new Java 8 forEach statement.
Date: 2019-08-17 View: 1520
-
How to set JAVA_HOME on Windows 10?
This tutorial shows you how to set a JAVA_HOME system variable on Windows 10.
Date: 2019-08-17 View: 1520
-
Java Check if key exists in HashMap
In Java, you can use Map.containsKey() to check if a key exists in a Map.
Date: 2019-08-17 View: 1520
-
Java How to delay few seconds
In Java, we can use TimeUnit.SECONDS.sleep() or Thread.sleep() to delay few seconds.
Date: 2019-08-17 View: 1520