代码,无法理解为什么我们有错误一切看起来都很好。请帮忙
import java.io.*;
public class ReadKeyboard3
{
public static void main(String[] args) throws IOException
{
Scanner scanner = new Scanner(System.in);
BufferedReader in = new BufferedReader(isr);
System.out.print("Enter marks for English: ");
String EnglishMarks = scanner.readline();
int English = Integer.parseInt(EnglishMarks);
System.out.print("Enter marks for Maths: ");
String MathsMarks = in.readLine();
int Maths = Integer.parseInt(MathsMarks);
System.out.print("Enter marks for Science: ");
String ScienceMarks = in.readLine();
int Science = Integer.parseInt(ScienceMarks);
float avg = (English + Maths + Science)/3;
system.out.println("Average of all 3 subjects:" +avg);
}
}
错误:
ReadKeyboard3.java:10: error: cannot find symbol
String EnglishMarks = in.readline();
^
symbol: method readline()
location: variable in of type BufferedReader
ReadKeyboard3.java:22: error: package system does not exist
system.out.println("Average of all 3 subjects:" +avg);
谁能帮助我理解错误
牛魔王的故事
相关分类