This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a class Pixel(x, y, filled) which holds the properties of a single pixel in a BufferedImage. x and y are simply the coordinates, and 'filled' is a boolean that specifies whether the pixel is filled or not (its really long to explain the whole thing, so this is just to give you an idea of what's going on)
Now I want to create a 2d array the size of my BufferedImage (Pixel pixelArray = new Pixel[width][height]), holding a new Pixel object in each cell with its own properties. Is it possible to use the following for-loop for this matter? Or do I have to change the name of the Pixel object every time?