<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Converting a Collection&lt;T&gt; to an array</title>
	<atom:link href="http://www.javablogging.com/converting-a-collection-to-an-array/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javablogging.com/converting-a-collection-to-an-array/</link>
	<description>Tracking surprises, features and bugs</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:43:49 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Benjamin Winterberg</title>
		<link>http://www.javablogging.com/converting-a-collection-to-an-array/comment-page-1/#comment-549</link>
		<dc:creator>Benjamin Winterberg</dc:creator>
		<pubDate>Tue, 06 Oct 2009 11:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=25#comment-549</guid>
		<description>Unlike T is not a primitive, its quite easy:

List list = Arrays.asList(new String[] {&quot;s1&quot;, &quot;s2&quot;});</description>
		<content:encoded><![CDATA[<p>Unlike T is not a primitive, its quite easy:</p>
<p>List list = Arrays.asList(new String[] {&#8221;s1&#8243;, &#8220;s2&#8243;});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.javablogging.com/converting-a-collection-to-an-array/comment-page-1/#comment-13</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Thu, 25 Jun 2009 23:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=25#comment-13</guid>
		<description>Using toArray is a bit odd the first time you see it when you haven&#039;t read much about how generics are implemented in Java.  The real PITA is trying to go the other way, from T[] to Iterable.  Especially if you are trying to include support for arrays of primitives.</description>
		<content:encoded><![CDATA[<p>Using toArray is a bit odd the first time you see it when you haven&#8217;t read much about how generics are implemented in Java.  The real PITA is trying to go the other way, from T[] to Iterable.  Especially if you are trying to include support for arrays of primitives.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Jablow</title>
		<link>http://www.javablogging.com/converting-a-collection-to-an-array/comment-page-1/#comment-11</link>
		<dc:creator>Eric Jablow</dc:creator>
		<pubDate>Wed, 24 Jun 2009 15:42:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=25#comment-11</guid>
		<description>Yes, this is irritating.  Usually, I don&#039;t use the &quot;create in place&quot; feature and end up writing code like

public static final EMPTY_STRING_ARRAY String[] = new String[0];

// Later

List strings = ...

String[] stringArray = strings.toArray(EMPTY_STRING_ARRAY);

I can use EMPTY_STRING_ARRAY more than once, but the code still is ugly.</description>
		<content:encoded><![CDATA[<p>Yes, this is irritating.  Usually, I don&#8217;t use the &#8220;create in place&#8221; feature and end up writing code like</p>
<p>public static final EMPTY_STRING_ARRAY String[] = new String[0];</p>
<p>// Later</p>
<p>List strings = &#8230;</p>
<p>String[] stringArray = strings.toArray(EMPTY_STRING_ARRAY);</p>
<p>I can use EMPTY_STRING_ARRAY more than once, but the code still is ugly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

