Correct syntax for creating an array in Scala –

94. Correct syntax for creating an array in Scala -

  1. var array_name : Array[data_type] = new Array[data_type(size)
  2. var array_name: Array[data_tpye] = new Array(size)
  3. var array_name = Array(element1, elmenet2, element3, ...)
  4. All of these

Answer: D) All of these

Explanation:

Read more: How to print an array in Scala?

Comments and Discussions!

Load comments ↻






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