Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

newbie question - generics

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Can someone please refresh my memory, what is the difference between writing:
List<Class> classes = new ArrayList<Class>();

Or:
List<Class<?>> classes = new ArrayList<Class<?>>();

Thank you
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should be the same . Class<?> is parameterless just as Class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic