This error occur when i try to pass the random value to my wordslist.
var random = Random().nextInt(wordslist.length); String word = wordslist[random];