• 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

I'm getting a few errors...

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And I'm just wondering what they mean that I need to do. Mainly just Two. I'll post the section of code that it's doing it on too. Thank you for the help. =P

<identifier> expected
ArrayList<JCheckBox> checkboxList;
---------^

AND

"(" or "[" expected
checkboxList = newArrayList<JCheckBox>();
---------------------------^
[ March 18, 2006: Message edited by: Darryl Neeley ]
 
Ranch Hand
Posts: 2412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that you are trying to compile code written for JDK 1.5 with JDK 1.4. Generics were added in 1.5, and if you compile in 1.4 you will get those errors.
 
Darryl Neeley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dammit...that means I need to install 1.5/5.0, doesn't it? =(
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep; or don't use generics. But installing a new JDK is really not a difficult thing. The only thing to watch out for is that your current JDK may have installed a copy of java.exe someplace like C:\WINDOWS; the symptom would be that after installing and updating your path, you'd see an error about "Unsupported class file version 49." If you have this problem, find the extra java.exe and delete it.
 
He's my best friend. Not yours. Mine. You can have 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