|
Hi,
I have a program that compiles fine on my computer using Java 1.5.0, Win 98 SE, but when tried to compile on linux, it returns this error:
/tmp/ioirunner1/gift1.java:18: error: ':' expected.
ArrayList<String> v = new ArrayList<String>();
^
(the ^ is under the r on string)
Does anyone know why this is happening? Or another way to declare the list to prevent it from happening?
Replay:Compile error??
just a question, what is ArrayList<String>?? is that one of your own classes? becuase i dont see it anywhere in the API
<UPDATE>
its ok now, i found out about it...
Replay:Compile error??
Could it be that on Linux you are not using JDK 5.0 but JDK 1.4?
That would explain the problem because JDK 1.4 doesn't understand Generics
Replay:Compile error??
Hmm could be, Ill ask the guy (its one of those grading sites for algo problems).
Replay:Compile error??
on linux, type javac -version
|