velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis <brede...@mac.com>
Subject Re: Access array objects by index
Date Fri, 28 Mar 2003 14:39:34 GMT
Hi Matthias,

On Friday, March 28, 2003, at 02:31  pm, Matthias David wrote:

> Well, if that was true the following code would compile:
>
>        String[] arr = new String[2];
>        arr[1] = "string";
>        System.out.println(arr.get(1));
>
> But arrays don't have a "get" or "set" method.

Well that means that you can't access objects by index in them. Try to 
put java.util.Arrays.asList(arr) in the context instead.

-- Denis.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message