Increament operator error

i started learning JAVA a few days back.i thought of writing my first program on arithmetic operators.but i m getting compilation error with the "++" operator.below is my code.[code]public class IntArithmeticOperations { public static void main(String args[]){ System.out.println("Arithmetic Operations Sample");

int increamentResult=++i;//This is okthis is saying add 1 which increments the value i to 11

int increamentResult1=++(i);//This is also okthe brackets doesn't matter in this one its the same as before but you're adding 1 again which makes the value 12

int increamentResult2=doit(++i); //This is also okthis is calling the doit method (which just goes down to see if there's anything in the method doit. You've only returned i so it comes back to this statement and increments it...so now its 13.

int increamentResult3=++(++i); //This gives a compilationerror

this is causing an error because it wants a variable. You're not calling any methods and you can't just put ++ and (++i). make these statements in different lines e.g int increamentResult3=i++;int incrementResult4 = doits(++i);

int increamentResult=++i;//This is okthis is saying add 1 which increments the value i to 11

int increamentResult1=++(i);//This is also okthe brackets doesn't matter in this one its the same as before but you're adding 1 again which makes the value 12

int increamentResult2=doit(++i); //This is also okthis is calling the doit method (which just goes down to see if there's anything in the method doit. You've only returned i so it comes back to this statement and increments it...so now its 13.

int increamentResult3=++(++i); //This gives a compilationerror

this is causing an error because it wants a variable. You're not calling any methods and you can't just put ++ and (++i). make these statements in different lines e.g int increamentResult3=i++;int incrementResult4 = doits(++i);

int increamentResult=++i;//This is okthis is saying add 1 which increments the value i to 11

int increamentResult1=++(i);//This is also okthe brackets doesn't matter in this one its the same as before but you're adding 1 again which makes the value 12

int increamentResult2=doit(++i); //This is also okthis is calling the doit method (which just goes down to see if there's anything in the method doit. You've only returned i so it comes back to this statement and increments it...so now its 13.

int increamentResult3=++(++i); //This gives a compilationerror

this is causing an error because it wants a variable. You're not calling any methods and you can't just put ++ and (++i). make these statements in different lines e.g int increamentResult3=i++;int incrementResult4 = doits(++i);