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.
ArrayList
Moderator: Board moderators
same Problem
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
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
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...
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...