这是我的 for 循环... jGRASP 说从我的 for 循环开始出现问题,我看不到问题,需要一些帮助来修复我的代码...
公共类 DirectoryLookup { public static void main(String[] args) 抛出 IOException {
if (args.length == 0) {
System.out.println("Please supply data file");
System.exit(0);
}
else {
System.out.println("Database server is Ready for Number Lookups!");
}
File inputDataFile = new File(args[0]);
Scanner inputFile = new Scanner(inputDataFile)
Scanner input = new Scanner(input.in);
int n = inputFile.nextInt();
int list[] = new int[n];
found = false;
while (Scanner.hasNext()); {
System.out.println("Enter number to check value");
int x = input.nextInt();
for (i = 0, i < n, i++);
if (x == list(i)); {
found = true; break
System.out.println("x is in the list");
else {
System.out.println("x is not in the list");
}
}