2 Replies Latest reply: Jun 3, 2007 10:19 AM by 807600 RSS

    Collections not compiling

    807600
      was trying to run a test from the JUnit faq, it calls for creating a collection, and it wouldn't compile, so I just did a little test file to see if I could play with it a bit, it still wouldn't compile.

      here's my code:
      public class CollectionTest  {
      
           ArrayList testCollection = new ArrayList();
      
      }
      it gives me this:
      C:\java\misc_test>javac CollectionTest.java
      CollectionTest.java:5: cannot find symbol
      symbol  : class ArrayList
      location: class CollectionTest
              ArrayList testCollection = new ArrayList();
              ^
      CollectionTest.java:5: cannot find symbol
      symbol  : class ArrayList
      location: class CollectionTest
              ArrayList testCollection = new ArrayList();
                                             ^
      2 errors
      thanks,
      bp