sree wrote:
> i [sic] gave two single dimensional arrays
>
> one array
> prioritynamearray=alistpriorityname.toArray(new
> String[alistpriorityname.size()]);
>
> two array
> taskvaluesarray=taskvaluesarraylist.toArray(new
> String[taskvaluesarraylist.size()]);
>
> The above code i take two ArrayList and convert two single dimensional
> arrays,
> now i need these two seperate arrays as two dimensional array.
> how please convert it and give solution,
>
First, Java doesn't actually have two-dimensional arrays. What is does have
is one-dimensional
arrays each of whose elements is an array, declared similarly to
Foo [][] someFoos =
{
{new Foo("00"), new Foo("01"),},
{new Foo("10"),},
};
There are various ways to declare arrays, as the docs show.
Foo [][] someFoos = new Foo [19] [17];
So you declare your "two-dimensional" array, then cycle through the
elements copying items
into your array.
--
Lew
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en