How can I fix the <identifier> expected errors and illegal start of type?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mother3epic12
    New Member
    • Jul 2022
    • 1

    How can I fix the <identifier> expected errors and illegal start of type?

    Code:
    System.out.println("\t\t Quiz Results");
    System.out.printf("%s %15s %15s %15s %15s %n", "Student Name", "Quiz1 Grade", "Quiz2 Grade","Difference", "Average");
    System.out.println("===========================================================");
    I keep getting errors for the first quotation mark on my code for each of my System.out.prin t Statements. How can I fix both of these errors, the <identifier> expected error and the illegal start of type error?
  • dev7060
    Recognized Expert Contributor
    • Mar 2017
    • 655

    #2
    Code:
    System.out.println("\t\t Quiz Results");
    System.out.printf("%s %15s %15s %15s %15s %n", "Student Name", "Quiz1 Grade", "Quiz2 Grade","Difference", "Average");
    System.out.println("===========================================================");
    I keep getting errors for the first quotation mark on my code for each of my System.out.prin t Statements. How can I fix both of these errors, the <identifier> expected error and the illegal start of type error?
    Statements are probably not present inside a function. Is this the whole program?

    Comment

    Working...