在 java前面import java.util.Random; Random c=new Random();int c=c.nextInt(3);
inta=(int)(3*Math.random()+1);
/roll 1-3