Scala List drop() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List drop() operation with examples. drop() operation is a useful operation of the Scala List which allows us to drop first N elements from the list or collection. When you call this operation on a Scala list, it returns a new collection by dropping the first […]

Scala List addString() with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List addString() operation with examples. There is an alternative to addString() operation in Scala, please have a look at mkString() List() is a collection to store values in an ordered fashion. addString() is the most useful method of a Scala collection which allows generating a string […]

Scala List mkString() with examples

Welcome to Scala series. In this tutorial, you will learn about the Scala List mkString() operation with examples. There is an alternative to mkString() operation in Scala, please have a look at addString() List() is a collection to store values in an ordered fashion. mkString() is the most useful method of a Scala collection which allows generating a string based on the […]

Scala List count() operation with examples

Welcome to Scala series. In this tutorial, you will learn about the Scala List count() operation with examples. List() is a collection to store values in an ordered fashion. count() operation is a useful operation of the Scala List which allows us to count the number of elements of the list based on a given predicate function. When you call this […]

Scala List sum() operation with examples

Welcome to Scala series. In this tutorial, you will learn about Scala List sum() operation with examples. List() is a collection to store values in an ordered fashion. sum() operation is a useful operation of the Scala List which allows us to retrieve the sum of elements of the list. When you call this operation on a Scala list, it returns […]

Scala List max() operation with examples

Welcome to Scala series. In this tutorial, you will learn about Scala List max() operation with examples. List() is a collection to store values in an ordered fashion. max() operation is a useful operation of the Scala List which allows us to retrieve maximum element/value from the list. When you call this operation on a Scala list, it returns an element […]

Scala List min() operation with examples

Welcome to Scala series. In this tutorial, you will learn about Scala List min() operation with examples. List() is a collection to store values in an ordered fashion. min() operation is a useful operation of the Scala List which allows us to retrieve minimum element/value from the list. When you call this operation on a Scala list, it returns an element […]

Scala List distinct() operation with examples

Welcome to Scala series. In this tutorial, you will learn about Scala List distinct() operation with examples. List() is a collection to store values in an ordered fashion. distinct() operation is a useful operation Scala List which allows us to retrieve distinct/unique values from the list. When you call this operation on a Scala list, it returns a new collection with […]

Scala List tail() operation with examples

Welcome to Scala series. In this tutorial, you will learn about Scala List tail() operation with examples. List() is a collection to store values in an ordered fashion. tail() operation is a useful operation Scala List which allows us to retrieve the rest of the collection without the first/head element of the list.When you call this  operation on a Scala list, […]

Scala List head() operation with examples

Welcome to Scala series. In this tutorial, you will learn about Scala List head() operation with examples. List() is a collection to store values in an ordered fashion. In order to get first/head element of the list,usually in Java we get the data of zero index.But in Scala, we have an operation head() to get the head/first element of the list. […]

How to use Collectors.groupingBy() in Java 8

Welcome to Java 8 series. In this tutorial, you will learn about how to use Collectors.groupingBy() in Java 8. If you would like to learn about Java 8 Stream operations.Please check out this link.I request you to have a basic understanding of Java 8 features and stream operations as a prerequisite.Please have a look at Java 8 complete guide. So let us […]