import java.util.Random;
import java.util.Scanner;
public class Lottery
{
private int[] lotteryNumbers = new int[5];
private int counter;
private int[] userNumbers = new int[5];
private Scanner keyboard = new Scanner(System.in);
public Lottery()
{
for(counter = 0; counter < 5; counter++)
{
lotteryNumbers[counter] = nextInt(int 10);
}
}
后面还有更多代码,但那里没有错误,所以我不会包含它。无论如何,上面写着“lotteryNumbers[counter] = nextInt(int 10);”的行 得到“.class 预期”错误。