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.