This article explores different ways to convert an IntArray to Array<Int> using Kotlin.

1. Using for loop

The idea is to create an array of Int type and assign values to it from the given IntArray using a for-loop.

Download Code

2. Convert To List

Another solution is to convert the specified IntArray to a list using the toList() function. Then, we can call toTypedArray() function to get an Array<Int>.

Download Code

That’s all about converting an IntArray to an array of Int using Kotlin.