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

Generics

 
yash Vi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the idea of imposing a constraint on linkedlist.Is the following statement legal,

LinkedList<String> list = new LinkedList<String>();
Y am I getting "(" or "[" expected error
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using Java 5.0, right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic