<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:s="http://www.techrepublic.com/search" xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
    <title><![CDATA[Discussion on Understand the inner workings of generics in Java ]]></title>
    <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750]]></link>
    <atom:link rel="hub" type="application/rss+xml" href="http://pubsubhubbub.appspot.com/" />
    <atom:link rel="self" type="application/rss+xml" href="http://www.techrepublic.com/forum/discussions/102-234750/rss" />

    <description><![CDATA[]]></description>
    <language>en-us</language>
    <lastBuildDate>2013-05-21T22:53:15-07:00</lastBuildDate>
             

    <item>
        <title><![CDATA[Type safety]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2309829]]></link>
        <description><![CDATA[I am in agreement with you on the type safety issue... I beleive that is it extremely overrated. I have to ask myself, &quot;what programmer is sticking things into a collection but has no idea what it is... how are they going to safely use it or get it out afterwards?&quot; To me, not verifying the type until you hit the collection you are storing it in smacls of laziness... why not catch it at the input level?J.Ja]]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2309829]]></guid>
        <dc:creator><![CDATA[Justin James]]></dc:creator>
        <pubDate>Tue, 28 Aug 2007 16:53:14 -0700</pubDate>
    </item>
             

    <item>
        <title><![CDATA[I think one advantage of generics in Java 1.5 is to let...]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2309111]]></link>
        <description><![CDATA[...you put type information in code with a minimum of overhead. Instead of: // A list of String List messages = new ArrayList(); You can use: List  messages = new ArrayList () Of course it would not be worth it without the added type safety. However, I think that this last aspect of generics is overrated. I have used zillions of Collections in very large Java applications without ever finding any error related to inserting the wrong type in one. If your Collections are encapsulated (as it should be) it is fairly easy to avoid mistakes. In fact my favorites Java 1.5 features are the new Enum functionnality, annotation(s) and the very rich concurrency package. Annotation is probably the most powerfull of the bunch. It let's you add meta-data to classes that you can use in unit tests, tools (code generators, ...) or at runtime in your application (using the reflection API). The great book &quot;Java Concurrency in practice&quot; for example has annotations for all sorts of concurrency related properties. The simplest example is the @NotThreadSafe annotation. A tool (the excellent FindBug might eventually do this) could check and give you a warning if it looks like your using an instance from different thread. I have used annotation recently to enforce rules about data member handling in a specific class method. This aspect of the class is tested in a unit test and if someone adds a member to the class without the proper annotaion or proper handling in the method tested; the unit test will fail. This kind of mechanism is great in large teams where comments just arent srong enough. Annotations are now used by persistence framework (Hibernate, ..), aspect oriented tools (AspectJ, ...) and other tools. ..oh boy, now I'm really of topic. SorryJS]]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2309111]]></guid>
        <dc:creator><![CDATA[jslarochelle]]></dc:creator>
        <pubDate>Mon, 27 Aug 2007 20:58:34 -0700</pubDate>
    </item>
             

    <item>
        <title><![CDATA[RE: Understand the inner workings of generics in Java]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2307094]]></link>
        <description><![CDATA[Good stuff. Other than the type checking, Comparator enforcement, autoboxing, and &quot;extends&quot; keyword, what are the advantages to using a Java generic over a different collection type? Since it is a compile-time feature, it does not deliver any run time benefits.J.Ja]]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2307094]]></guid>
        <dc:creator><![CDATA[Justin James]]></dc:creator>
        <pubDate>Thu, 23 Aug 2007 18:17:38 -0700</pubDate>
    </item>
             

    <item>
        <title><![CDATA[A typo]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2306860]]></link>
        <description><![CDATA[This is atypo, thanks. What is meant is that surely you cannot write null elements.]]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2306860]]></guid>
        <dc:creator><![CDATA[peter_econ@...]]></dc:creator>
        <pubDate>Thu, 23 Aug 2007 11:14:55 -0700</pubDate>
    </item>
             

    <item>
        <title><![CDATA[RE: Understand the inner workings of generics in Java]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2306765]]></link>
        <description><![CDATA[When You say &quot;writing non-null elements to the list is not allowed&quot; does it mean You can not write anything but null value to the List ? Or I am missing something...]]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2306765]]></guid>
        <dc:creator><![CDATA[pletisan@...]]></dc:creator>
        <pubDate>Thu, 23 Aug 2007 09:27:56 -0700</pubDate>
    </item>
             

    <item>
        <title><![CDATA[mention]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2306490]]></link>
        <description><![CDATA[nice article.Message was edited by: beth.blakely@...]]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-234750-2306490]]></guid>
        <dc:creator><![CDATA[teksty32@...]]></dc:creator>
        <pubDate>Thu, 23 Aug 2007 04:27:00 -0700</pubDate>
    </item>
    </channel>
</rss>

