Lambda Expressions

By Raul Rios

Lambda expressions add a new ability to the Java language: to pass a function as an argument to another method. Before lambda expressions you could do something similar using anonymous inner classes and functional interfaces, but the result code became less legible and clear:

Lambda expressions let you create ..Continue Reading

Calendar Classes

By Raul Rios

Java 8 introduced a replacement for the old date and time classes existing in the java.util.Date package: the new java.time package, based on the Joda-Time project, designed for multiple calendar systems (the default is the ISO8601) and supporting time zone, duration, format and parsing. The four java.time classes you must know ..Continue Reading

The Java Collections API

By Raul Rios

Arrays are good and fast, but they are static (once they are created they can’t grow). In this lesson we’re going to review three hierarchically related types from the Java Collections API that provide dynamic data structures: Type extends implements Description interface Collection  Iterable  –  General dynamic collection of elements that ..Continue Reading

The StringBuilder Class

By Raul Rios

A StringBuilder object is like a String object but it can be modified. Internally it’s treated like a variable-length array that contains a sequence of characters: it has capacity (max number of characters it can contain) and length (number of characters of the string that the object represents). StringBuilder Main ..Continue Reading

The String Class

By Raul Rios

The String class is immutable: once it’s created, a String object can’t be changed. Therefore its methods never affect the original String object but create and return a new String object that contains the result of the operation. In order to correctly answer questions in the exam about strings you ..Continue Reading