You have to import the class first. Add import java.util.Random; at the top of your code.
import java.util.Random;