I created an arraylist with 4 items
val myList = arrayListOf("Item1", "Item2", "Item3", "Item4")
Then I printed a random item from myList
val randomNum = Random()
val randomItem = randomNum.nextInt(myList.count())
println(myList[randomItem])
Shouldn't this fail? Once randomItem is equal to 4? Ideally what I'm asking is that randomItem is returning an int from 0-4, correct? But the arraylist index is only 0-3. Should I do -1 to randomItem? I'm just confused because the program isn't throwing an error.