Home » Author Archives: Dani Buiza

Author Archives: Dani Buiza

Dani Buiza
Daniel Gutierrez Diez holds a Master in Computer Science Engineering from the University of Oviedo (Spain) and a Post Grade as Specialist in Foreign Trade from the UNED (Spain). Daniel has been working for different clients and companies in several Java projects as programmer, designer, trainer, consultant and technical lead.

HashMap changes in Java 8

The way java.util.HashMap entries are indexed and stored has changed in the Java 8 update. Hash elements use balanced trees instead of linked lists under certain circumstances now. All these is what this article is about. The main idea is that when the number of items in a hash is larger than a certain value, the hash will change from ...

Read More »

Java 8 Base64 Encoding Example

This article is about encoding Strings using Java. Until now, this was only possible by using external libraries, since Java update 8, encoding and decoding is part of the standard JRE. In old Java versions, it was needed to use external libraries like commons-codec or sum.misc.BASE64Decoder for encoding and decoding Strings. Now, the package java.util already contains a couple of ...

Read More »

Java 8 Parallel Arrays Example

In this article we are going to talk about the new possibilities offered in Java 8 for execute Arrays operations in parallel. We are going to focus on the Arrays class methods. At the end of this article you can download all the examples and snippets (and more). All code has been implemented using Java 8 update 11 and Eclipse ...

Read More »

Java 8 Concurrency Tutorial

This article is about concurrency and parallel processing features in Java update 8. It is necessary to mention that concurrency is a very complicated matter and depends strongly in the hardware used for testing and benchmarking. The purpose of this article is not to compare performances using the different ways offered by Java but to list the new options that ...

Read More »

Java 8 Optional Example

Last Updated Jan. 18, 2019 In this article we are going to show how to use the new java.util.Optional class. The null reference is a very common problem in Java, everybody got once a NullPointerException because some variable or input parameter was not properly validated. In Java, null, can have a logical value and a meaning; so it is important ...

Read More »

Java 8 Default Methods Tutorial

In this article we are going to explain how to use and take advantage of the possibility to implement default methods in interfaces. This is one of the most important features that are available since Java update 8. All examples have been implemented using Eclipse Luna version 4.4 and Java version 8 update 5. Reasons for default methods in interfaces ...

Read More »

Java 8 Date/Time API Tutorial

In this article we are going to explain the main features of the new Date/Time API coming with Java 8. We are going to briefly explain why a new Date/Time API is necessary in Java and what benefits it has in comparison with the “old” world. All examples listed in this article have been done using Eclipse Luna version 4.4 ...

Read More »

Java 8 Stream API Tutorial

Java 8 offers several new functionalities. One of the most important is the new Streams API. Basically, Streams are sequences of elements that support concatenated operations. They used a source and allow different intermediate and terminal operations. The combination of source and all the operations involved is called stream pipeline (because Streams allow operations to be pipelined or concatenated).   ...

Read More »

Log4j Maven example

In this article we are going to explain how to use Maven and Log4j in a Java project. All examples in this article have been implemented using Java version 8 update 5, Maven version 3.2.2 and Log4j version 1.2.17 (all for and under Windows 64b). This Log4j version is the last one supported in the maven repositories at the moment ...

Read More »

Java 8 Lambda Expressions Tutorial

In this article we are going to explain what Lambdas are, why are they important and how do they look like in Java. We are going to see also a couple of examples and real life applications. All examples are being implemented using Eclipse Luna version 4.4 and Java version 8 update 5. Lambdas? A Lambda, in general, is a ...

Read More »