Why is this Java class not working?

I'm just groing through a few exercises and I just want to know why this class is not working.

it is saying 'The value of local variable 'average' is not used'

public class Integers {
public static void main(String[] args) {

int count, index, sum, average ; // declare variables
count = 8; // line 1
index = sum = count + 2; // line 2
sum = count + index * 2; // line 3
average = (count + sum + index) / 3; // line 4
}
}

Help Please, I need understanding.

?2012-10-17T18:05:31Z

Favorite Answer

What you are getting is not actually an error, just an information message. It is telling you that you are never using the variable "average" for anything. For example, if you added the line of code "system.out.println("AVG:" + average)" below your code, the message would disappear, as you are now using the variable for something.