choubix alex wrote:First: is it possible to have a multi dimension array using different types of variables?
let's say the first dimension would be int, the 2nd dimension would be a string...
2nd: in the code (see below) I am using a 2 dimensions array and I store some values into it like this:
multiDollar[i][0] = dollarEarned[i];
multiDollar[0][i] = dollarEarned2[i];
is it possible to do this using a single line?
3rd: apparently there is a problem in my loop as the out.println return only 2000
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
for instance:
int[][] multiDollar = new int[1][dollarEarned2.length];
would mean that multiDollar has 2 rows and 3 columns (because dollarEarned2.length = 3).
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|