What is the difference between :: and #:: in Scala? What is the difference between ::: and #::: in Scala?
Answer / Arnab Ghosh
[":: (cons) and #:: (reverse cons) are used for appending elements to lists. The difference is that :: places the element at the head of the list, while #:: places it at the tail. ::: and #::: concatenate two lists with :: and #:: respectively, but they do not reverse the order as their counterparts."]
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the advantage of Scala?
What is the Relationship between equals method and == in Scala? Differentiate Scala’s == and Java’s == Operator?
Explain function currying in scala?
Is Scala a Pure OOP Language? or Java a Pure OOP Language?
Why is scala faster than java? Explain
What does f method in scala string interpolation?
What do you understand by apply and unapply methods in scala?
What is an array in scala?
What are major differences between Java-Based and Scala-Based Maven Project’s structure?
What are streams in scala?
What is a ‘Scala map’?
What is a flatmap in scala?