public class Gradesv2
{
    public static void main(String[ ] args)
    {
        //local variables
        int numTests = 0;       //counts number of tests
        int testgGrades = 0;    //individual test grade
        int totalPoints = 0;    //total points for all test
        double average = 0.0;   //average grade
        int test1 = 95;
        int test2 = 73;
        int test3 = 91;
        int test4 = 82;

        System.out.println("");
        System.out.println("Test # 1 Test Grade: " + test1 + "    Total Points: " + test1 + " = " + totalPoints + "Average Score: " + test1 =  +);
    }//end of main method
}//end of class

Let's start at line 0. Because I don't know all languages I'm not going to make an assumption here so what programming language is this? And what line is giving the error?

It would also help if you posted in the appropriate forum.

Looks like Java

Why did you put the keyword Public there?

Whats wrong with declaring a class public?

I keep getting this illegal start of expression and can't figure out why.

It's because line 16 ends with = +); which makes no sense at all (and isn't valid Java syntax)

@JC. I put this code into a C++ compiler and it couldn't budge past that line until I removed it. Might be the old machine I was on but I thought we'd start with the first line.

This is java code.

commented: When I first read this, I didn't see that tag. Anyhow, will re-read. +15

@JC. I put this code into a C++ compiler..

Apart from the odd chars right at the end of line 16 this is 100% valid Java,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.