This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

non-generic collection always compiles with warning ?  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
non-generic collection always compiles with warning ?
is it correct?
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



It depends on how you use the non-generic collection.
[ April 30, 2007: Message edited by: Barry Gaunt ]
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code wont generate any warnings

public class Wonder
{
public static void main(String[] args)
{
List l = new ArrayList(); // no warning
List<String> ls = new ArrayList<String>(); //NO warning
}
}
[ April 30, 2007: Message edited by: Param Yalamanchili ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!