{"version":"1.0","blog_title":"\u3046\u306a\u306e\u65e5\u8a18","provider_name":"Hatena Blog","url":"https://unageanu.hatenablog.com/entry/20081017/1224241405","description":"generic array creation\u3088\u308a\u3002\u578b\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u793a\u3055\u308c\u308b\u578b\u306e\u914d\u5217\u3092\u4f5c\u308a\u305f\u3044\u5834\u5408\u3001\u666e\u901a\u306bnew\u3057\u3066\u4f5c\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u306e\u3067\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u4f5c\u3063\u3066\u3044\u305f\u306e\u3060\u3051\u3069\u3001 // a\u3068b\u306e\u914d\u5217\u3092\u4f5c\u308a\u305f\u3044\u3002 X a = null; X b = null; // \u3053\u308c\u306f\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u30fb\u30fb // X[] array = new X[2]; // \u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u4f5c\u308b X[] array = (X[]) Array.newInstance( a.getClass(), 2 ); array[0] = a; array[1] = b; \u2193\u306e\u3088\u3046\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u3063\u3066\u3084\u308c\u3070\u3044\u3044\u306e\u304b\u3002 // \u6307\u5b9a\u3055\u308c\u305f\u5f15\u2026","author_url":"https://blog.hatena.ne.jp/unageanu/","blog_url":"https://unageanu.hatenablog.com/","title":" \u578b\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u793a\u3055\u308c\u308b\u578b\u306e\u914d\u5217\u3092\u4f5c\u308a\u305f\u3044","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20081017%2F1224241405\" title=\" \u578b\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u793a\u3055\u308c\u308b\u578b\u306e\u914d\u5217\u3092\u4f5c\u308a\u305f\u3044 - \u3046\u306a\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2008-10-17 20:03:25","image_url":null,"width":"100%","type":"rich","author_name":"unageanu","categories":["Java"],"provider_url":"https://hatena.blog"}