Page 1 of 1

Posted: Tue Nov 20, 2001 5:48 pm
by Diueine
Since I have registered at UVA h service I always have used ArrayList in my problems solutions, and always it worked.
Although, in the last 2 days I am receving a compiler error message:

00658362_24.java:7: Type `ArrayList' not found in the declaration of the local
variable `a'.
ArrayList a = new ArrayList();
^
1 error


I already tryed everithing I could think. I would like a judge, moderator or any other who knows what is hapening, please tell me. Cannot I use Collections anymore??

Thanks a lot.

same Problem

Posted: Wed Apr 24, 2002 3:32 pm
by Fireball
So...

i have the same Problem... except that the judge compile the import statement

import java.util.ArrayList;

but doesn't know the class when you use it afterwards.

The judge also doesn't know

import java.util.Iterator;

My compile errors:

00833278_24.java:7: Class or interface `java.util.Iterator' not found in import.
import java.util.Iterator;
^
00833278_24.java:43: Type `java.util.ArrayList' not found in the declaration of the argument `points' of method `Output'.
void Output(java.util.ArrayList points) {
^
00833278_24.java:44: Type `java.util.Iterator' not found in the declaration of the local variable `e'.
java.util.Iterator e = points.iterator();
^
00833278_24.java:77: Type `java.util.ArrayList' not found in the declaration of the local variable `inputList'.
java.util.ArrayList inputList = new java.util.ArrayList();
^
00833278_24.java:97: Type `java.util.ArrayList' not found in the declaration of the local variable `pointlist'.
java.util.ArrayList pointlist;
^
00833278_24.java:99: Type `java.util.Iterator' not found in the declaration of the local variable `e'.
java.util.Iterator e = inputList.iterator();
^
6 errors


Does somebody know a workaround?

P.S.: Why can't the judge compile inner classes?

Fireball

Posted: Mon Dec 01, 2003 1:22 am
by drewsome
I'm having the same problem too. It would be great if someone could fix it :)

Posted: Sun Dec 07, 2003 11:09 pm
by Spike
I feel like a broken record. Most of the java.util functions don't work with UVA's java compiler. In addition, they are running a gcj compiler that supports some java 1.2 functions, so if it was added in 1.3 or 1.4, tough luck.

It's also a pain in the butt trying to use one of the few things that they do support, and what you'll probably have to use if you're not just too fed up with the site to keep trying. java.util.Vector.

Vectors are supported, but you have to use the old vector methods. Don't use .add() use .addElement() and so on...

Posted: Mon Dec 08, 2003 12:06 am
by drewsome
Yeah.. I really hope they upgrade their java support soon :)

It's horrible.. you can't even do basic sorting using the Arrays or Collections classes.

Argh.. maybe I'll have to bite the bullet and learn the C++ STL.