0
How do i create a array String called computerMove and then make it choose a random element in the array?(In Java)
My array: String() computerMove = {"r", "p", "s"}; <---- (Make it choose one at random)
1 ответ
+ 3
Create an int using random up to 2, then it will pick from 0, 1 or 2, which should do what you want.