Skip to content

Category Archives: Scala

The subSequence() method is utilized to find the sub-sequence from the given String, And this sub-sequence starts and ends with the index we specify. Method… Read More
The takeRight() method is utilized to return a set consisting of last ‘n’ elements of the set. Method Definition: def takeRight(n: Int):Set[A] Where ‘n’ is… Read More
The dropWhile() method is utilized to drop the longest prefix from the front which satisfies a given predicate in a queue. Method Definition: def dropWhile(p:… Read More
The +:() method is utilized to return a new queue with an element added at the front of the given queue. Method Definition: def +:[B… Read More
The +=() method is utilized to add an element at the back of a given queue. Method Definition: def +=(elem: A): Queue.this.type Return Type: It… Read More
The +=:() method is utilized to add an element at the front of a queue. Method Definition: def +=:(elem: A): Queue.this.type Return Type: It returns… Read More
The ++=() method is utilized to add element of a queue at the back of another queue. Method Definition: def ++=(xs: IterableOnce[A]): Queue.this.type Return Type:… Read More
The :+() method is utilized to return a new queue with an element added at the back of the given queue. Method Definition: def:+[B >:… Read More
The apply() method is utilized to find the element at any given index in a queue. Method Definition: def apply(idx: Int): A Return Type: It… Read More
The clear() method is utilized to delete all the elements of the queue. Method Definition: def clear(): Unit Return Type: It returns an empty queue.… Read More
The clone() method is used to create a copy of the given queue. Method Definition: defclone(): Queue[A] Return Type: It return a new queue which… Read More
The copyToArray() method is utilized in copying the elements of the queue to an Array. Method Definition: def copyToArray[B >: A](xs: Array[B], start: Int, len:… Read More
The count() method is utilized to count the number of elements in the queue that satisfies a given predicate. Method Definition: def count(p: (A) =>… Read More
The last() method is utilized to return the last element of the set. Method Definition: def last: A Return Type: It returns the last element… Read More
The contains() method is utilized to check if an element is present in the set of not. Method Definition: def contains(elem: A): Boolean Return Type:… Read More

Start Your Coding Journey Now!