This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
what are your data, show us sample. If your data is like, you want to get nth row and mth column directly, probably the only option is array. you have sth like all values can be grouped together based on one unique value, you can choose map.
For reasons explained here, please avoid that sort of abbreviation. People who didn't learn English as a first language won't understand that, least of all after you said "nth" and "mth".
Java doesn't support 2-Dimensional arrays. It supports arrays of arrays, which can be more versatile. For example your array of arrays can include differently sized arrays, or even an empty array, as its elements.
Rahul P Kumar
Joined: Sep 26, 2009
Campbell Ritchie wrote:For reasons explained here, please avoid that sort of abbreviation. People who didn't learn English as a first language won't understand that, least of all after you said "nth" and "mth".
if you want to write mth row, how you will write in this editor, is there any facility to write superscripts?
Joined: Sep 10, 2008
Thanks for the input everyone.
Could I also use a map as follows?
Map<Integer, String> mydata = new HashMap<Integer, String>();
Integer would represent the row number, and the array of strings would hold the columns?
subject: Best option for two dimensional data - rectangular data - rows columns