I'm really new to Scala so this might not be really good.   Riener
made me wonder if Scala was incompatible with Java Lists so I had to
try to see if he was right.

scala> import java.util.List;
import java.util.List

scala> import java.util.ArrayList;
import java.util.ArrayList

scala> val names : List[String] = new ArrayList[String]();
names: java.util.List[String] = []

scala> names.add("bob");
res0: Boolean = true

scala> names.add("chuck");
res1: Boolean = true

scala> names.contains("bob");
res2: Boolean = true

It worked for me.  I know Scala has another List in scala.List but I
know Java has another List in java.util.List and in java.awt.List.
So I don't understand what your saying.

On Dec 23, 2:45 pm, Reinier Zwitserloot <[email protected]> wrote:
> Scala's Lists aren't compatible with java's lists. Scala needs 'views'
> because without them things aren't properly compatible. Your own say
> so:

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" 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/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to