The :::() operator in Scala is utilized to join the List in the argument to the another List.
Method Definition: def :::(prefix: List[A]): List[A]
Return Type: It returns a list after joining one list to the another one.
List(4, 5, 6, 1, 2, 3)
List(1, 2, 3)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.