• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ArrayList driving me crazy !!!!!

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 265
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic