wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes ArrayList driving me crazy !!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ArrayList driving me crazy !!!!! " Watch "ArrayList driving me crazy !!!!! " New topic

ArrayList driving me crazy !!!!!

manolo zapata

Joined: Apr 28, 2008
Posts: 2
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 !!!


[ April 28, 2008: Message edited by: manolo zapata ]
[ April 28, 2008: Message edited by: manolo zapata ]
Stevi Deter
Ranch Hand

Joined: Mar 22, 2008
Posts: 265

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.

There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
manolo zapata

Joined: Apr 28, 2008
Posts: 2
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
I agree. Here's the link: http://aspose.com/file-tools
subject: ArrayList driving me crazy !!!!!
Similar Threads
Problem Adding Different "Book" Objects Into A "Library" Array
Sorting a numerical Array
Check if ArrayList Contains a Map
Problem in sorting data in Richface DataTable
Problem in displaying data in Richface DataTable