ColdFusion arrays are Java Vectors, am not sure why this is done this way in
CFMX cause
the preferred Java Collection for Dyanamic Arrays are ArrayList Java
Collection Objects.

Bruce Eckel's (Thinking in Java) older edition(http://64.78.49.204/) gives
some details..
why Java Vector Objects are not Appropriate for usage in Java 1.2 and have
just been adopted
in Java 1.2 implementing List Interface.. for Legacy code support.

I am trying to use ArrayList.indexOf(Object elem) and i get method selection
Exception

This works... dont know why..
<cfscript>
xArray = listToArray("1,2,3,4,5",",");
xIdx = xArray.indexOf("4");// this returns 3.. since arrays start with zero
index in Java.
</cfscript>

But when i return an ArrayList from Java.. and search ArrayList Object,
i get method selection exceptions.. indexOf is not overloaded for ArrayList
but is
overloaded for vectors.. Any Ideas how i can get this to work?

Thanks,
Joe Eugene

<<attachment: winmail.dat>>

Reply via email to