Array and ArrayBuffer in Scala

Hey there!

Welcome to ClearUrDoubt.com.

In this post, we will look at a program to demonstrate Array and ArrayBuffer objects in Scala.

  •   Scala arrays are similar to Java arrays.
  •   ArrayBuffer will provide a way to add elements at the beginning(+=:) and ending(+=) of ArrayBuffer object.

Let’s look at a simple program:

Output:

Happy Learning.

Please leave a reply in case of any queries.

Leave a Reply

Your email address will not be published. Required fields are marked *