Scala list contains() and containsSlice() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List contains()  and containsSlice() operation with examples. Scala contains() Scala contains() operation allows us to check if the list has a particular element or not.contains() returns a boolean value.If the list has the given element then it returns true else false. Scala contains() operation is applicable to […]

Scala list apply() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List apply() operation with examples. Scala apply() operation allows us to take/retrieve the elements of the given index. apply() operation accepts the index and retrieves the elements of that particular index. apply() operation in Scala is similar to get() operation in Java list to retrieve the element […]

Scala list init() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List init() operation with examples. Scala init() operation allows us to take/retrieve part of the collection by eliminating the last element. init() operation will return new collection by taking all the elements but without the last element.init() will omit the last element of the collection. Scala init() […]

Scala list takeWhile() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List takeWhile() operation with examples. Scala takeWhile() operation allows us to take the first prefix elements that satisfy the given predicate from the collection. takeWhile() operation will return new collection with prefix elements but it should satisfy the given boolean/predicate expression. Scala takeWhile() operation is applicable to […]

Scala list takeRight() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List takeRight() operation with examples. Scala takeRight() operation allows us to take the last N elements in the collection. takeRight() operation will return new collection with last/rear N elements.i.e., elements from right to left. Scala takeRight() operation is applicable to all types of Scala collections. takeRight() Syntax […]

Scala list take() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List take() operation with examples. Scala take() operation allows us to take first N elements in the collection. take() operation will return new collection with first N elements. Scala take() operation is applicable to all types of Scala collections. take() Syntax def take(n: Int): List[A] Selects the […]

Scala List sameElements() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List sameElements() operation with examples. Scala sameElements() operation is a useful operation of the Scala List or any collection which allows us to compare and check if both collections are having the same elements in the same order. When you apply sameElements() method on a collection with […]

Scala List reverse() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List reverse() operation with examples. Scala reverse() operation which allows reversing the elements of the list.reverse() operation will return a new collection by reversing the elements of the collection. reverse() operation is applicable to all types of Scala collections and it is really a useful function to […]

Scala List findLast() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List findLast() operation with examples. Scala findLast() operation is a useful operation of the Scala List or any collection which allows us to get/find the last element from the list or collection based on a given predicate function. When you call this findLast() operation on a Scala […]

Scala List find() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List find() operation with examples. Scala find() operation is a useful operation of the Scala List or any collection which allows us to get/find the first element from the list or collection based on a given predicate function. When you call this operation on a Scala list, […]

Scala List filterNot() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List filterNot() operation with examples. Scala filterNot() operation is a useful operation of the Scala List or any collection which allows us to filter elements from the list or collection which is not satisfying given predicate function. When you call this filterNot() operation on a Scala list, […]

Scala List filter() operation with examples

Welcome to the Scala series. In this tutorial, you will learn about the Scala List filter() operation with examples. Scala filter() operation is a useful operation of the Scala List or any collection which allows us to filter elements from the list or collection based on a given predicate function. When you call this operation on a Scala list, it returns […]

Apache Kafka + Spark streaming + Apache Kafka Integration example

Welcome to real-time processing example series. In this tutorial, I will explain a simple integration example based on  Apache Kafka + Spark streaming + Apache Kafka Integration. What is Apache Kafka? Apache Kafka is a distributed messaging system that is based on publishing and subscribing model. Apache Kafka is not only a messaging system but also a stream processor that […]