2012-01-28から1日間の記事一覧

Java の総称型と Eclipse の警告と設計

以下のようなフィールドがあったとします。 private final List<String>[] list = new List[] { new ArrayList<String>(), }; このコードを Eclipse の標準設定で書くと、以下のような警告が出ます。 Type safety: The expression of type List needs unchecked conversion t</string></string>…