Java 8 Stream skip() vs limit() 1. Introduction In this short article, we’ll talk about the skip() and limit() methods of the Java Stream API and highlight their similarities and differences. Even though these two operations may look quite similar at first, they actually behave very differently and are not… Continue Reading java-stream-skip-vs-limit

BufferedReader vs Console vs Scanner in Java 1. Overview In this article, we’re going to walk through the differences between BufferedReader, Console, and Scanner classes in Java. To have a deep dive on each topic, we suggest having a look at our individual articles on Java Scanner, Console I/O in Java,… Continue Reading bufferedreader-vs-console-vs-scanner-in-java

Inheritance and Composition (Is-a vs Has-a relationship) in Java 1. Overview Inheritance and composition — along with abstraction, encapsulation, and polymorphism — are cornerstones of object-oriented programming (OOP). In this tutorial, we’ll cover the basics of inheritance and composition, and we’ll focus strongly on spotting the differences between the two… Continue Reading java-inheritance-composition

Method References in Java 1. Overview One of the most welcome changes in Java 8 was the introduction of lambda expressions, as these allow us to forego anonymous classes, greatly reducing boilerplate code and improving readability. Method references are a special type of lambda expressions. They’re often used to create simple… Continue Reading java-method-references