Scala - Utility methods for operating on arrays Code Example

The code for Utility methods for operating on arrays

val a = Array(1, 2)
val b = Array.ofDim[Int](2)
val c = Array.concat(a, b)

// Where the array objects a, b and c have respectively the values 
// Array(1, 2), Array(0, 0) and Array(1, 2, 0, 0).
Code by IncludeHelp, on August 10, 2022 23:35
Reference: scala-lang.org

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.