java.util.List & java.util.ArrayList


I would need to implement sequence by timestamp from a group of files retreived. For that, writing java service and trying to import packages

  • java.util.List
  • java.util.ArrayList

and creating List object by this way,

  List timeList = new ArrayList();

and getting compile error in developer as
“not a statement” List

FYI, I am using JRE 1.4.2 and for this I need to use List as above.

Also, I tried to use List as this way used for JDK 1.5 and no success.
List timeList = new ArrayList ();

Any thought would be greatly appreciated.


Mh, I can compile it with no error on 6.5.

Just created an empty java service, import (in Shared tab) java.util.ArrayList & java.util.List and put in the code the line:

List timeList = new ArrayList();

Maybe post the code and give more info about env & extended settings.


Thanks Sandro! for your reply.

I do not have an answer why it not worked in first case for me. Next day when I saved/compiled the same java code it worked.