• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generics  RSS feed

 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I know why the error is happening but I'm not sure on what I can do exactly to resolve the problem. Here are some snippets of code :


I get this as (one of) an error when trying to compile (using Xlint:unchecked) :


What can I do to avoid the error messages coming up (other than suppressing them)? Thanks in advance.

Rob
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Hunter wrote:What can I do to avoid the error messages coming up (other than suppressing them)? Thanks in advance.

Try
List<List<String>> dataInOverall;

Winston
 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried that earlier and received an error message that I should have looked at more closely. When I changed another line of code I received no error messages or warnings at all. Thanks for the post.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!