This week's book giveaway is in the Open Source Projects forum. We're giving away four copies of Eclipse Collections Categorically: Level up your programming game and have Donald Raab on-line! See this thread for details.
It is because of your for loop condition. You are initializing i=10 and then checking to see if i<0. None of the code inside the for loop is executed which leaves the value of x=0.
Live ordinary life in an extraordinary way. Details embedded in this tiny ad: