Question: The code is wrong, Im getting an error score = input . nextDouble ( ) ; System . out.print ( Enter a score:

The code is wrong, Im getting an error
score=input.nextDouble();
System.out.print("Enterascore:");
Scannerinput=newScanner(System.in);
publicstaticvoidmain(String[]args){
publicclassGrader{
importjava.util.Scanner;
Question 1
Setup
-s
Compile
0 of 1
1s
Description
The program could not compile correctly. Check the output field below to read about compilation errors.
More information
Error: Failed to compile program
Comments produced:
errorjava compiler:
'else' without 'if'
Answer.java line 19
Answer.java line 17
Answer.java line 15
Answer.java line 13
errorjava compiler:
illegal start of expression
Answer.java line 1
Answer.java line 2
errorjava compiler:
Error found after student code on line 44: class, interface, enum, or record expected

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!