Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ArrayList driving me crazy !!!!!

 
manolo zapata
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok guys begginer here, I have a problem that drives me crazy

I try to create an arraylist but I keep getting identifier expected and '(' or '[' expected errors, I thought its something I do, but I copied and tried an example snippet from the net and exactly the same, I use 1.6 sdk

here's the example snippet



and the error I get is :




can anyone help it is killing me !!!

thanks

[ April 28, 2008: Message edited by: manolo zapata ]
[ April 28, 2008: Message edited by: manolo zapata ]
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manolo,
Are you sure Java 6 is the first JDK on your path?

Assuming you're on windows, open a command line, and type "PATH" and see what's there.

It looks like the version of javac being found is Java 1.4 or earlier (pre-Generics). The example code you gave runs fine on my system with Java 6.
 
manolo zapata
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a look and it seems you are right

it goes through 1.4.2 first

I will try and fix this ,

thanks very much for the help (dont go away sorta speak, I bet I'll need more help with this )


thanks a lot man
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic