Question
I get the following error when running the code below, can someone help me fix it please C:UsersMichaelDesktopGradeTester.java:45: error: reached end of file while parsing
I get the following error when running the code below, can someone help me fix it please
C:\Users\Michael\Desktop\GradeTester.java:45: error: reached end of file while parsing } ^ 1 error
Tool completed with exit code 1
import java.util.Scanner;
public class GradeTester {
public static void main(String[] args) { // Declaring variables
/* * Creating an Scanner class object which is used to get the inputs * entered by the user */ Scanner sc = new Scanner(System.in); int grammer, spelling, correctlen, content; // Create an instance of Eassy Eassy compitition = new Eassy();
while (true) { System.out.print("Enter Points for Grammer :"); grammer = sc.nextInt();
System.out.print("Enter Points for Spelling :"); spelling = sc.nextInt();
System.out.print("Enter Points for Correct Length :"); correctlen = sc.nextInt();
System.out.print("Enter Points for Content :"); correctlen = sc.nextInt();
compitition.setGrammar(grammer); compitition.setSpelling(spelling); compitition.setCorrectLength(correctlen); compitition.setContent(content);
// Getting the character from the user 'Y' or 'y' or 'N' or 'n' System.out.print("Do you want to continue(Y/N) ::"); char ch = sc.next(".").charAt(0); if (ch == 'Y' || ch == 'y') continue; else { System.out.println(":: Program Exit ::"); break; }
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started