int[ ][ ] aryNumbers = new int[6][5];
Wednesday, January 21, 2015
Multi-Dimensional Arrays
Wednesday, January 14, 2015
Arrays
Java Arrays
What is an Array?
So far, you have been working with variables that hold only one value. The integer variables you have set up have held only one number, and the string variables just one long string of text. An array is a way to hold more than one value at a time. It's like a list of items. Think of an array as the columns in a spreadsheet. You can have a spreadsheet with only one column, or lots of columns. The data held in a single-list array might look like this:To set up an array of number like that in the image above, you have to tell Java what kind of data is going in to your array (integers, strings, boolean values, etc). You then need to say how many positions the array has.
Friday, January 9, 2015
Subscribe to:
Comments (Atom)