This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I'm getting a few errors...

 
Darryl Neeley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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 ]
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Dammit...that means I need to install 1.5/5.0, doesn't it? =(
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic