我是Java编程的初学者,我想知道:它是什么意思或它的功能: obtainMarks = se.nextInt(); 在这段代码中:
package ifstatment;
import java.util.Scanner;
public class Ifstatment {
public static void main(String[] args) {
int obtainedMarks ;
int passingMarks;
String grade;
Scanner se = new Scanner(System.in);
System.out.println("Enter your scoor");
passingMarks = 40 ;
obtainedMarks = se.nextInt();
if (obtainedMarks >= passingMarks ){
if (obtainedMarks > 90)
grade = "A";
else if (obtainedMarks > 75)
grade = "B";
else if (obtainedMarks > 65)
grade = "C";
else
grade ="D";
System.out.println("You passed the exam and your grade is"+ grade);
} else {
grade = "F";
System.out.println("You failed in thee exam and your grade is " + grade);
}
}
}