Skip to content

firdau.si

Wisdom is the lost property of the Believer

Tag Archives: initialization

Java Tips: Initializing Collection

Especially in unit test, it is common case that we have to initialize an array or a collection. Well, for array, it’s OK… A simple code that we know can solve the problem: But how about Collection? Normal way to initialize collection is something like this (which pretty ugly): I hardly find an elegant solution […]

Posted bynandaJuly 1, 2010Posted injavaTags: collection, initialization, javaLeave a comment on Java Tips: Initializing Collection
firdau.si, Proudly powered by WordPress.
  • eclipse
  • java
  • apple
  • fun