<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5265685944548777967</id><updated>2024-10-24T14:40:38.099-07:00</updated><title type='text'>Flavio CDC  - software developer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-5381619875114427704</id><published>2013-07-18T11:14:00.002-07:00</published><updated>2013-07-18T11:15:04.848-07:00</updated><title type='text'>Test di Wilcoxon per due campioni</title><content type='html'>&lt;div class=&quot;page&quot;&gt;
Il contenuto di questo sito è rilasciato sotto licenza 
&lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.0/&quot; rel=&quot;license&quot; title=&quot;Creative Commons License&quot;&gt;&lt;img alt=&quot;Creative Commons License&quot; height=&quot;15&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/button-cc.gif&quot; width=&quot;80&quot; /&gt;&lt;/a&gt;

se non specificato diversamente  
    
    


&lt;br /&gt;
&lt;h1&gt;
&lt;a href=&quot;http://www.blogger.com/null&quot; id=&quot;test_di_wilcoxon_per_due_campioni&quot; name=&quot;test_di_wilcoxon_per_due_campioni&quot;&gt;Test di Wilcoxon per due campioni&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
Per eseguire in R il test di Wilcoxon per due campioni è necesario utilizzare la funzione &lt;b&gt;wilcox.test&lt;/b&gt;.
&lt;br /&gt;
Vediamo un esempio di applicazione del test &lt;b&gt;a due code&lt;/b&gt; su due campioni &lt;i&gt;da&lt;/i&gt; (66 elementi) e &lt;i&gt;db&lt;/i&gt; (40 elementi) &lt;b&gt;non appaiati&lt;/b&gt;
&lt;br /&gt;
&lt;pre class=&quot;code r&quot;&gt;wilcox.test(da,db,alternative=&quot;two.sided&quot;,paired=FALSE)&lt;/pre&gt;
il risultato sarà nel nostro caso

&lt;br /&gt;
&lt;pre class=&quot;code r&quot;&gt; Wilcoxon rank sum test with continuity correction
&amp;nbsp;
data:  da and db 
W = 1142.5, p-value = 0.2482
alternative hypothesis: true location shift is not equal to 0&lt;/pre&gt;
Da notare che vengno restituiti sia il &lt;b&gt;P-value&lt;/b&gt; che il valore della &lt;b&gt;statistica test W&lt;/b&gt;.
La funzione &lt;b&gt;wilcox.test&lt;/b&gt; prende in input molti parametri, alcuni dei quali opzionali; nell&#39;esempio ne abbiamo utilizzati due:
&lt;br /&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
paired: true o false–&amp;gt; Indica se i due campioni sono appaiati o meno&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
alternative: “two.sided”, “greater” o
 “less” –&amp;gt; indica se l&#39;ipotesi alternativa è a due code o se è ad una
 coda (destra o sinistra)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
Se inseriamo il risultato del test in una variabile invece che stamparlo a video otteniamo una struttura come la seguente

&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;structure(list(statistic = structure(1142.5, .Names = &quot;W&quot;), parameter = NULL, 
    p.value = 0.248158967552218, null.value = structure(0, .Names = &quot;location shift&quot;), 
    alternative = &quot;two.sided&quot;, method = &quot;Wilcoxon rank sum test with continuity correction&quot;, 
    data.name = &quot;da and db&quot;), .Names = c(&quot;statistic&quot;, &quot;parameter&quot;, 
&quot;p.value&quot;, &quot;null.value&quot;, &quot;alternative&quot;, &quot;method&quot;, &quot;data.name&quot;
), class = &quot;htest&quot;)
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/5381619875114427704/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2013/07/il-contenuto-di-questo-sito-e.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/5381619875114427704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/5381619875114427704'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2013/07/il-contenuto-di-questo-sito-e.html' title='Test di Wilcoxon per due campioni'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-1905607869913258792</id><published>2012-03-11T04:07:00.001-07:00</published><updated>2012-03-11T04:08:23.098-07:00</updated><title type='text'>Introduzione a java e generics parte 6 - Reificazione</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;level1&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 3px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Reificazione, si è una parola Italiana …&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
PREV&amp;nbsp;&lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:generics:evoluzione_non_rivoluzione&quot; style=&quot;color: rgb(0, 153, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; title=&quot;java:generics:evoluzione_non_rivoluzione&quot;&gt;Evoluzione, non rivoluzione&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Reificazione&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;defnizioni_di_reifcazione&quot; name=&quot;defnizioni_di_reifcazione&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Defnizioni di reifcazione&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Processo mentale mediante il quale a concetti astratti viene assegnata consistenza di cose concrete&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Nella flosofa di Marx, processo secondo cui nell&#39;economia capitalistica l&#39;uomo e il suo lavoro sono ridotti al valore della merce che producono&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
La reifcazione è una fallacia o un&#39;ambiguità quando un&#39;astrazione (una credenza astratta o un costrutto ipotetico) viene trattata come se fosse un concreto evento reale o un&#39;entità fsica&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Nell&#39;ambito dell&#39;Ingegneria della conoscenza, e in particolare della defnizione di ontologie, la reifcazione è una rappresentazione indiretta che prevede l&#39;utilizzo di determinate espressioni del linguaggio per descrivere entità del mondo reale intuitivamente associate a espressioni di tipo diverso. L&#39;esempio tipico di reifcazione è costituito dall&#39;utilizzo di individui per rappresentare classi.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Nel contesto della programmazione orientata agli oggetti si defnisce reifcazione il procedimento di creazione di un modello di dati basato su un concetto astratto predefnito. Mediante la reifcazione, un computer può compiere elaborazioni riguardanti un&#39;entità astratta come se si trattasse di un insieme qualsiasi di dati di altro tipo&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Defnizioni di reifcazione&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;unchecked_cast&quot; name=&quot;unchecked_cast&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Unchecked cast&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Non sempre il compilatore è in grado di capire se un cast verso un tipo non reifcabile avrà successo I sistemi di tipi (dei linguaggi di programmazione orientati agli oggetti) non sono perfetti e non possono individuare situazioni di successo come può fare un (buon) programmatore Per questo motivo un cast verso un tipo non reifcabile non genera un errore ma un warning&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Unchecked cast&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;in_java&quot; name=&quot;in_java&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;In java&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In java un tipo è reifcabile se il tipo è completamente identifcabile a runtime, ovvero se la type erasure non rimuove informazioni utili&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;In java&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;tipi_reifcabili&quot; name=&quot;tipi_reifcabili&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Tipi reifcabili&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Primitivi es: int&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Classi o interfacce non parametriche es: String, Comparable&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Tipi parametrici in cui tutti gli argomenti di tipo sono wildcard non limitati es: List&amp;lt;?&amp;gt; o Map&amp;lt;?,?&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Raw type es: List, Map Array di elementi di tipo reifcabile es: int[] , List&amp;lt;?&amp;gt;[]&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Tipi reifcabili&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;tipi_non_riefcabili&quot; name=&quot;tipi_non_riefcabili&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Tipi non riefcabili&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Variabili di tipo es: T in Xxxx&amp;lt;T&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Tipi parametrici con parametri attuali es: List&amp;lt;String&amp;gt;, Comparable&amp;lt;Integer&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Tipi parametrici con un limite es: List&amp;lt;? extends String&amp;gt; , Comparable &amp;lt;? super Number&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Tipi non riefcabili&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;note&quot; name=&quot;note&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Note&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In java il tipo di un array viene reifcato con il tipo dei suoi componenti Un tipo parametrico non viene reifcato con il suo parametro di tipo List&amp;lt;?&amp;gt; è equivalente a List&amp;lt;? extends Object&amp;gt; (nel senso di passaggio di parametri) ma il primo è reifcabile il secondo no&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Note&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;instance_test_e_cast&quot; name=&quot;instance_test_e_cast&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Instance test e cast&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I test instanceof ed i cast dipendono dall&#39;esame a runtime dei tipi degli oggetti coinvolti e quindi dalla reifcazione Test di istanza verso un tipo non reifcabile → errore (di compilazione) Cast ad un tipo non reifcabile → genera (di norma) un warning&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; Myinteger &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; value&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;boolean&lt;/span&gt; equals&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&amp;nbsp;
Myinteger è reificabile → il cast non genere warning
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;o &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;instanceof&lt;/span&gt; Myinteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;  &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// ynteger è reificabile → compila&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt; ==
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Myinteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Myinteger è reificabile → il cast non genere warning&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; ...
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;/code java&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
===== Equals su liste =====
&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;code&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; MiaLista&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; AbstractCollection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implements&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;boolean&lt;/span&gt; equals&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; o &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;instanceof&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; it1 = iterator&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; it2 = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;o &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;iterator&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;it1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; it2.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
E e1 = it1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; E e2 = it2.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; e1 == &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;null&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;?&lt;/span&gt; e2== &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;null&lt;/span&gt;: e1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;e2&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;!&lt;/span&gt;it1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;!&lt;/span&gt;it2.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Instance test e cast&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;equals_su_listeanalisi&quot; name=&quot;equals_su_listeanalisi&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Equals su liste: analisi&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; MiaLista&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; AbstractCollection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implements&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;boolean&lt;/span&gt; equals&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; o &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;instanceof&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; it1 = iterator&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Errore di compilazione! List&amp;lt;E&amp;gt; non è reificabile&lt;/span&gt;
Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; it2 =
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;o &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;iterator&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;it1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Unchecked cast warning!&lt;/span&gt;
&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; it2.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; ...&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Equals su liste: analisi&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;equals_su_listeversione_fxata&quot; name=&quot;equals_su_listeversione_fxata&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Equals su liste: versione fxata&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; MiaListaOK&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; AbstractCollection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implements&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; it1 = iterator&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; it2 = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;o &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;iterator&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;it1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; it2.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;!&lt;/span&gt;it1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;!&lt;/span&gt;it2.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Equals su liste: versione fxata&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;analisi&quot; name=&quot;analisi&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Analisi&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; MiaListaOK&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; AbstractCollection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implements&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;boolean&lt;/span&gt; equals&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; o &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;instanceof&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; it1 = iterator&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// OK List&amp;lt;?&amp;gt; è reificabile&lt;/span&gt;
 Iterator&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; it2 = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;o &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;iterator&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// List&amp;lt;?&amp;gt; è reificbaile e non vengono generati warning&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;....
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; e2 = it2.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Da una List&amp;lt;?&amp;gt; posso prelevare Object senza problemi&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Analisi&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;cast_non_reifcabili&quot; name=&quot;cast_non_reifcabili&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Cast non reifcabili&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Test di istanza verso tipi non reifcabili generano sempre errore In alcune circostanze un cast ad un tipo non reifcabile può non generare warning&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Cast non reifcabili&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;nessun_warning&quot; name=&quot;nessun_warning&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Nessun warning&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; asList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; c &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AIllegalArgumentException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;IllegalArgumentException&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; 
 &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; c &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;instanceof&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// List&amp;lt;?&amp;gt; è reificabile → compila&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;c&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Il cast non genera waring in quanto la sorgente del cast ha tipo Collection&amp;lt;T&amp;gt; &lt;/span&gt;
                                    &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// e ogni oggetto di questo tipo che implementa List deve avere come tipo List&amp;lt;T&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AIllegalArgumentException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;IllegalArgumentException&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Il parametro passato non e&#39; un sottotipo di List&amp;lt;T&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; converti&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; oggetti&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; obj: oggetti&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//Il cast “a logica” non fallirà mai&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; obj &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;instanceof&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AIllegalArgumentException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;IllegalArgumentException&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; ... &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// OK String è reificabile&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;oggetti&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Unchecked Cast ← il compilatore non è in grado di capire se il cast avrà successo o meno&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Nota: è illegare “castare” una lista di oggetti ad una lista di stringhe, quindi serve il doppio cast&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Nessun warning&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;array_e_reifcazione&quot; name=&quot;array_e_reifcazione&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Array e reifcazione&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Gli array reifcano i loro componenti ovvero conservano a runtime i tipi dei loro componenti&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Array e reifcazione&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;un_vecchio_esempio&quot; name=&quot;un_vecchio_esempio&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Un vecchio esempio&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; interi = &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// OK, gli array sono covarianti&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ANumber+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Number&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; numeri = interi&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
numeri&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// ArrayStoreException Double non è compatibile con il tipo reificato dell&#39;array&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Un vecchio esempio&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;creazione_di_array&quot; name=&quot;creazione_di_array&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Creazione di array&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; c&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&amp;nbsp;
T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; ret= &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;c.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// NO! errore di compilazione&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T x :c&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;ret&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; = x&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; ret&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Le variabili di tipo non sono reificabili → viene generato un generic array creation error&lt;/div&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;Cannot create a generic array of T 
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Creazione di array&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;difetti&quot; name=&quot;difetti&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Difetti ...&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Non poter creare array di generics è una limitazione di java Array generici sono problematici a causa della erasure (tuttavia) erasure facilita l&#39;evoluzione&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In generale … dire “no!” ad array ed utilizzare il Collection Framework&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Difetti ...&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;refection&quot; name=&quot;refection&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Refection ...&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Tramite refection è possibile ovviare al problema della creazione di array generici&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Refection ...&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;dont_try_this_at_home&quot; name=&quot;dont_try_this_at_home&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Dont&#39; try this at home&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; ret = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;coll.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Unchecked Cast!&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T x :coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;ret&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; = x&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; 
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; ret&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; --- 
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; stringhe = ... &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; a = toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;stringhe&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Class Cast Exception&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;Exception in thread &quot;main&quot; java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
at generics.cap6.Ex1.main(Ex1.java:23)
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Dont&#39; try this at home&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;messaggio_oscuro&quot; name=&quot;messaggio_oscuro&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Messaggio oscuro&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Exception&lt;/span&gt;&lt;/a&gt; in thread &lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;main&quot;&lt;/span&gt; java.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lang&lt;/span&gt;.&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AClassCastException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ClassCastException&lt;/span&gt;&lt;/a&gt;: 
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;Ljava.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lang&lt;/span&gt;.&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; cannot be cast to &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;Ljava.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lang&lt;/span&gt;.&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
at generics.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;cap6&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Ex1&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Ex1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;java&lt;/span&gt;:&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
L signifca array di reference type&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
[LObject signifca array di Object, Object è il component type dell&#39;array&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
L&#39;errore non viene segnalato nel punto in cui viene generato (!) ma in un altro punto (!!!) ovvero nel main&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Messaggio oscuro&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;versione_generata_dall_erasureanalisi&quot; name=&quot;versione_generata_dall_erasureanalisi&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Versione generata dall&#39;erasure: analisi&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; toArray1&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ACollection+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Collection&lt;/span&gt;&lt;/a&gt; coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; ret = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;coll.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Unchecked Cast sparito! --&amp;gt; Erasure: converte il cast a T[] in un Cast a Object[]&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; x :coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
ret&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; = x&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; 
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; ret&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
 --- List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; stringhe =
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;mondo&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; 
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; a = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;stringhe&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//ClassCastError --&amp;gt; Erasure: inserisce il cast a String[]&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Attenzione! Nonostante l&#39;array contenga solamente stringhe, il suo tipo reifcato è un array di Object!&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Versione generata dall&#39;erasure: analisi&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;cast_iron_guarantee_ancora&quot; name=&quot;cast_iron_guarantee_ancora&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Cast iron guarantee (ancora)&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I cast inseriti dall&#39;erasure non falliscono mai a parte quando viene generato un unchecked cast warning Quando viene generato un unchecked cast warning allora i cast inseriti dalla erasure&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Possono fallire&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Possono essere segnalati in parti del codice diferenti da quella che ha generato l&#39;errore&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Cast iron guarantee (ancora)&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;adoro_i_soldi_che_generano_i_soldi&quot; name=&quot;adoro_i_soldi_che_generano_i_soldi&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Adoro i soldi che generano i soldi&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
A volte un modo per fare soldi è tramite altri soldi. Lo stesso si può applicare agli array: generare array tramite un altro array&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;
 T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; coll, T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; arr&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
 T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; ret = &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; ret = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;java.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lang&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;reflect&lt;/span&gt;.&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArray+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Array&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;newInstance&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;arr.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getClass&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getComponentType&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;, &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// unchecked cast&lt;/span&gt;
coll.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T elem: coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; ret&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; = elem&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; ret&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Adoro i soldi che generano i soldi&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;esecuzione_del_codice&quot; name=&quot;esecuzione_del_codice&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Esecuzione del codice&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; a= &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; st = toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;a, &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; s: st&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ASystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Ok! Funziona!&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il metodo getCoponentType() restituisce un “Class Object” che rappresente il tipo dei componenti dell&#39;Array T&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Class&amp;lt;?&amp;gt; ctype = arr.getClass().getComponentType(); Nel nostro caso è String&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:reificazione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Esecuzione del codice&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; color: black; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;la_versione_di_classe&quot; name=&quot;la_versione_di_classe&quot; style=&quot;color: rgb(0, 0, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;La versione &quot;di classe&quot;&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; 
Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; coll, Class&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; classse&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
 T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; ret = &lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; 
 ret = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;java.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lang&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;reflect&lt;/span&gt;.&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArray+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Array&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;newInstance&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;
   Classse, coll.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; 
 &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T elem: coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; ret&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; = elem&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; ret&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; a= &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt; st2 = toArray&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;a, &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;kw2&quot; style=&quot;color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/1905607869913258792/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/03/introduzione-java-e-generics-parte-vi.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1905607869913258792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1905607869913258792'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/03/introduzione-java-e-generics-parte-vi.html' title='Introduzione a java e generics parte 6 - Reificazione'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-1171694576126099944</id><published>2012-03-05T02:15:00.001-08:00</published><updated>2012-03-05T02:15:24.927-08:00</updated><title type='text'>Introduzione a java e generics parte 5 - Evoluzione, non rivoluzione</title><content type='html'>&lt;code&gt;Migrare gradualmente il codice all&#39;utilizzo dei generics (&lt;em&gt;evoluzione&lt;/em&gt;) senza modifche radicali (&lt;em&gt;rivoluzione&lt;/em&gt;)&lt;/code&gt;
&lt;br /&gt;



&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2&gt;
&lt;a href=&quot;&quot; id=&quot;evoluzione&quot; name=&quot;evoluzione&quot;&gt;Evoluzione&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;



L&#39;implementazione dei generics permette che il vecchio codice venga 
compilato ed eseguito anche con l&#39;utilizzo delle
nuove librerie L&#39;evoluzione è più forte della retro compatibilità: non 
esistono più versioni delle classi e delle librerie ma una sola versione
 (grazie alla type &lt;em&gt;erasure&lt;/em&gt;) compatibile
&lt;br /&gt;



Non sempre è possibile mettere mano a tutto il codice
&lt;br /&gt;

&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 È costoso&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Non abbiamo accesso ai sorgenti&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Possiamo mettere le mani solo sul client o sulla libreria&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
  …&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
E&#39; quindi necessario procedere per passi
&lt;br /&gt;


&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2&gt;
&lt;a href=&quot;&quot; id=&quot;raw_type_e_generic_type&quot; name=&quot;raw_type_e_generic_type&quot;&gt;Raw type e generic type&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;



 I raw types sono la controparte legacy dei generic types
&lt;br /&gt;

&lt;table class=&quot;inline&quot;&gt;
 &lt;tbody&gt;
&lt;tr class=&quot;row0&quot;&gt;
  &lt;th class=&quot;col0&quot;&gt;Generic&lt;/th&gt;&lt;th class=&quot;col1&quot;&gt;Raw&lt;/th&gt;
 &lt;/tr&gt;
&lt;tr class=&quot;row1&quot;&gt;
  &lt;td class=&quot;col0&quot;&gt;Stack&amp;lt;E&amp;gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; Stack&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr class=&quot;row2&quot;&gt;
  &lt;td class=&quot;col0&quot;&gt;List&amp;lt;E&amp;gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;List&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr class=&quot;row3&quot;&gt;
  &lt;td class=&quot;col0&quot;&gt;ArrayStack&amp;lt;E&amp;gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; ArrayStack&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2&gt;
&lt;a href=&quot;&quot; id=&quot;casi_di_evoluzione&quot; name=&quot;casi_di_evoluzione&quot;&gt;Casi di evoluzione&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;



Dovendo utilizzare client con librerie abbiamo 4 casi
&lt;br /&gt;

&lt;table class=&quot;inline&quot;&gt;
 &lt;tbody&gt;
&lt;tr class=&quot;row0&quot;&gt;
  &lt;th class=&quot;col0&quot;&gt;Client / Libreria&lt;/th&gt;&lt;th class=&quot;col1&quot;&gt;Libreria Generic&lt;/th&gt;&lt;th class=&quot;col2&quot;&gt;Libreria Legacy&lt;/th&gt;
 &lt;/tr&gt;
&lt;tr class=&quot;row1&quot;&gt;
  &lt;th class=&quot;col0&quot;&gt;Client Generic &lt;/th&gt;&lt;td class=&quot;col1&quot;&gt;CG,LG &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt;CG,LL&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr class=&quot;row2&quot;&gt;
  &lt;th class=&quot;col0&quot;&gt;Client Legacy &lt;/th&gt;&lt;td class=&quot;col1&quot;&gt;CL,LG &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt;CL,LL&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;a href=&quot;&quot; id=&quot;client_generic_libreria_generic&quot; name=&quot;client_generic_libreria_generic&quot;&gt;Client Generic, Libreria Generic&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;




Non pone grossi problemi (è il punto di arrivo).
Per arrivare a questo punto di norma tutte le occorrenze di Object vengono sostituite con opportuni parametri di tipo (solo
dove ha senso) 
&lt;br /&gt;


&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;a href=&quot;&quot; id=&quot;client_legacy_libreria_legacy&quot; name=&quot;client_legacy_libreria_legacy&quot;&gt;Client Legacy, Libreria Legacy&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;



Di norma è il punto di partenza dell&#39;evoluzione in cui sono presenti solo raw type
&lt;br /&gt;

&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; fai&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AList+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;List&lt;/span&gt;&lt;/a&gt; l&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; ...&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
questo codice genera un &lt;em&gt;warning&lt;/em&gt;:

&lt;br /&gt;

&lt;pre class=&quot;code&quot;&gt;List is a raw type. References to generic type List&amp;lt;E&amp;gt; should be parametrized
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;a href=&quot;&quot; id=&quot;client_legacy_libreria_generica&quot; name=&quot;client_legacy_libreria_generica&quot;&gt;Client Legacy, Libreria generica&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;



E&#39; il caso più importante di retro compatibilità: il Collection framework di java 5 deve funzionare con i client di java 1.4.
Per supportare l&#39;evoluzione, per ogni parametro generico java  riconosce anche il suo raw type
&lt;br /&gt;



&lt;code&gt;Ogni tipo parametrico è sottotipo del corrispondente raw type&lt;/code&gt;
&lt;br /&gt;



Un oggetto “parametrico” può quindi essere utilizzato quando ci si aspetta un raw type
&lt;br /&gt;


&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;a href=&quot;&quot; id=&quot;unchecked_conversion_warning&quot; name=&quot;unchecked_conversion_warning&quot;&gt;Unchecked conversion warning&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;



Di norma è un errore utilizzare un supertipo di T quando ci si aspetta un oggetto di tipo T.
&lt;br /&gt;



Eccezione alla regola: è possibile utilizzare un &lt;em&gt;raw type&lt;/em&gt; al posto di uno dei corrispondenti tipi parametrici 
&lt;br /&gt;



Viene tuttavia generato un &lt;em&gt;&lt;em class=&quot;u&quot;&gt;unchecked&lt;/em&gt; conversion warning&lt;/em&gt;
&lt;br /&gt;

&lt;pre class=&quot;code java&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AList+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;List&lt;/span&gt;&lt;/a&gt; a = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// OK, normale sottotipizzazione&lt;/span&gt;
List&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; x = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrayList+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;ArrayList&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// OK ... ma genera un Unchecked Conversion Warning&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code&quot;&gt;Type safety: the expression of type ArrayList needs unchecked conversion to conform to List&amp;lt;String&amp;gt;
&lt;/pre&gt;
&lt;em&gt;&lt;em class=&quot;u&quot;&gt;&amp;nbsp;&lt;/em&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;em class=&quot;u&quot;&gt;Unchecked&lt;/em&gt; conversion warning&lt;/em&gt; indica che il 
compilatore non è in grado di ofrire le stesse garanzie che sono 
possibili quando i generics vengono utilizzati in maniera uniforme.
&lt;br /&gt;



Vengono comunque assicurate le stesse (???) garanzie di quando non si utilizzano per niente i generics (!!!)&lt;br /&gt;
&lt;br /&gt;



&lt;code&gt;Non vale la cast iron guarantee&lt;/code&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:generics:evoluzione_non_rivoluzione&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;a href=&quot;&quot; id=&quot;client_generico_libreria_legacy&quot; name=&quot;client_generico_libreria_legacy&quot;&gt;Client generico, Libreria Legacy&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;pre class=&quot;code java&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AList+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;List&lt;/span&gt;&lt;/a&gt; l
= &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
l.&lt;span class=&quot;me1&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;elem&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
Il codice compila ma viene generato un &lt;code&gt;&lt;em class=&quot;u&quot;&gt;Unchecked&lt;/em&gt; Call Warning&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;&lt;/code&gt;
&lt;br /&gt;

&lt;pre class=&quot;code&quot;&gt;Pippo.java:7: warning: [unchecked] unchecked call to add(E) as a member of the raw
type java.util.List
l.add(elem);&lt;/pre&gt;
&lt;pre class=&quot;code&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; /&gt; Se i warning vi danno doia … 

&lt;br /&gt;

&lt;pre class=&quot;code&quot;&gt;@SuppressWarnings(&quot;unchecked&quot;)
&lt;/pre&gt;
(a vostro rischio e pericolo)
&lt;br /&gt;


&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/1171694576126099944/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/03/introduzione-java-e-generics-parte-5.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1171694576126099944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1171694576126099944'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/03/introduzione-java-e-generics-parte-5.html' title='Introduzione a java e generics parte 5 - Evoluzione, non rivoluzione'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-7875729599144901806</id><published>2012-02-13T03:40:00.000-08:00</published><updated>2012-02-13T03:40:02.670-08:00</updated><title type='text'>Mysql e date con tutti ZERO</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
&lt;/h1&gt;
&lt;br /&gt;
&lt;div class=&quot;level1&quot;&gt;


&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:mysql_e_date_null&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
 &lt;br /&gt;


Premetto che non capirò mai a cosa serva la data &lt;strong&gt;0000-00-00&lt;/strong&gt; in quanto se una data non è definita è meglio usare &lt;strong&gt;null&lt;/strong&gt;,
 premetto inoltre che ho una certa antipatia per MySQL … purtroppo non 
posso scegliere io la tecnologia da usare quindi mi tocca usare anche 
MySQL.&lt;br /&gt;
&lt;br /&gt;



Detto ciò, mi sono imbattuto nel problema di come gestire la data &lt;strong&gt;0000-00-00&lt;/strong&gt; presente in un db MySQL all&#39;interno di codeice java, ad esempio per recuperara la data da una colonna di una tabella.
&lt;br /&gt;



Chiaramente il metodo &lt;em&gt;getDate()&lt;/em&gt; lancia un&#39;eccezione se trova una data del tipo &lt;strong&gt;0000-00-00&lt;/strong&gt;
 in quanto non è una data (i progettisti di MySQL sanno che i giorni 
vanno da 1 a 31 ed i mesi da 1 a 12???); a me non piace neanche usare &lt;em&gt;getString()&lt;/em&gt; e/o usare vari &lt;em&gt;try/catch&lt;/em&gt; quindi cercando su internet ho trovato un&#39;altra soluzione: &lt;strong&gt;modificare la &lt;acronym title=&quot;Uniform Resource Locator&quot;&gt;URL&lt;/acronym&gt; JDBC&lt;/strong&gt; in modo da passare null al posto delle date &lt;strong&gt;0000-00-00&lt;/strong&gt;
Tale &lt;acronym title=&quot;Uniform Resource Locator&quot;&gt;URL&lt;/acronym&gt; è simile  alla seguente&lt;br /&gt;
&lt;br /&gt;

&lt;pre class=&quot;code&quot;&gt;jdbc:mysql://myhost.mydomain/mydb?zeroDateTimeBehavior=convertToNull
&lt;/pre&gt;
&lt;br /&gt;
da notare il parametro &lt;strong&gt;zeroDateTimeBehavior=convertToNull&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;
&lt;br /&gt;


&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/7875729599144901806/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/02/mysql-e-date-con-tutti-zero.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/7875729599144901806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/7875729599144901806'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/02/mysql-e-date-con-tutti-zero.html' title='Mysql e date con tutti ZERO'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-2028258349277234768</id><published>2012-02-02T02:21:00.000-08:00</published><updated>2012-02-02T02:21:48.108-08:00</updated><title type='text'>Floating point da riga di comando</title><content type='html'>&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/linux:floating_point_da_riga_di_comando&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
A volte, ma non troppo spesso, mi capita di dover inserire dei calcoli in virgola mobile in uno script bash; il problema è che (per quanto ne so io) bash non supporta i numeri in virgola mobile, è quindi necessario utilizzare una calcolatrice da riga di comando da integrare nello script bash. La calcolatrice che utilizzo è&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bc&lt;/strong&gt;&amp;nbsp;che si trova su molte distribuzioni linux e su Mac&amp;nbsp;&lt;acronym style=&quot;border-bottom-color: rgb(0, 0, 0); border-bottom-style: dotted; border-bottom-width: 1px; cursor: help; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Operating System&quot;&gt;OS&lt;/acronym&gt;&amp;nbsp;X Vediamo un esempio di funzionamento&lt;/div&gt;
&lt;pre class=&quot;code bash&quot; style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em; text-align: justify;&quot;&gt;miohost:~ miouser$ &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bc&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bc&lt;/span&gt; &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1.06&lt;/span&gt;
Copyright &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1991&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;-1994&lt;/span&gt;, &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1997&lt;/span&gt;, &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1998&lt;/span&gt;, &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2000&lt;/span&gt; Free Software Foundation, Inc.
This is &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;free&lt;/span&gt; software with ABSOLUTELY NO WARRANTY.
For details &lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;type&lt;/span&gt; `warranty&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;. 
11 / 3
3&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
c&#39;è qualcosa che non torna …&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #638c9c; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
compaiono degli “header” inutili –&amp;gt; questi possono essere messi a tacere con il flag&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;-q&lt;/strong&gt;&amp;nbsp;(lanciare il comando&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bc -q&lt;/strong&gt;&amp;nbsp;al posto di&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bc&lt;/strong&gt;)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
i numeri non sono a virgola mobile –&amp;gt; per farli a virgola mobile è necessario impostare nello script&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bc&lt;/strong&gt;&amp;nbsp;il parametro&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;scale=…&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code bash&quot; style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em; text-align: justify;&quot;&gt;miohost:~ miouser$ &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bc&lt;/span&gt; -q
&lt;span class=&quot;re2&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;scale=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3.66666&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Per il resto …&amp;nbsp;&lt;acronym style=&quot;border-bottom-color: rgb(0, 0, 0); border-bottom-style: dotted; border-bottom-width: 1px; cursor: help; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Read The Fine Manual&quot;&gt;RTFM&lt;/acronym&gt;&amp;nbsp;… ovvero&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;man bc&lt;/strong&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/2028258349277234768/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/02/floating-point-da-riga-di-comando.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/2028258349277234768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/2028258349277234768'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/02/floating-point-da-riga-di-comando.html' title='Floating point da riga di comando'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-5003690147455606385</id><published>2012-01-31T11:44:00.001-08:00</published><updated>2012-03-05T02:15:43.568-08:00</updated><title type='text'>Introduzione a java e generics parte 4 - Dichiarazioni di variabili</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;level1&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 3px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
PREV&amp;nbsp;&lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; style=&quot;color: rgb(0, 153, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; title=&quot;java:generics:confronti_tra_elementi&quot;&gt;Confronti tra elementi&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Dichiarazioni di variabili&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;costruttori&quot; name=&quot;costruttori&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Costruttori&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Coppia&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;P,S&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;final&lt;/span&gt; P primo&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;final&lt;/span&gt; S secondo&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; P getPrimo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; primo&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; S getSecondo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; secondo&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; Coppia&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;P primo, S secondo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;primo&lt;/span&gt; = primo&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;secondo&lt;/span&gt; = secondo&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In una classe generica i parametri di tipo appaiono nell&#39;intestazione che dichiara la classe&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;non nel costruttore!&lt;/b&gt;&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;Coppia&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String, Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; c = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; Coppia&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String, Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;Ciao&quot;&lt;/span&gt;, &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; c.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getPrimo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;Ciao&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; c.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getSecondo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;Coppia&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String,Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; c = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; Coppia&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;Ciao&quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;Warning&lt;/i&gt;!&amp;nbsp;&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;UncheckedWarning&lt;/i&gt;&amp;nbsp;L&#39;istruzione è legale ma genera un warning&amp;nbsp;&lt;i style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(non è detto che valga la Cast Iron Guarantee)&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Costruttori&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;static&quot; name=&quot;static&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Static&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; interi = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; stringhe = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;mondo&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; interi.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getClass&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; == stringhe.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getClass&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I generics sono implementati tramite&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;type erasure&lt;/b&gt;&amp;nbsp;List&amp;lt;String&amp;gt; e List&amp;lt;Integer&amp;gt; a tempo di compilazione sono List&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Type erasure →&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
variabili e metodi statici di classi generiche sono condivise tra tutte le istanze della classe&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
le variabili e metodi statici di una classe generica non possono far riferimento ai parametri di tipo della classe accedendo ad un metodo statico di una classe generica il nome della classe non deve essere parametrizzato (con la variabile di tipo)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Static&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;esempio_static&quot; name=&quot;esempio_static&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Esempio static&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Cella&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; id&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;final&lt;/span&gt; T valore&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; count = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; getCount&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; count&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; nextId&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; count++&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; getId&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; id&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; T getValore&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; valore&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; 
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; Cella&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt; T valore&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;id&lt;/span&gt; = nextId&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;valore&lt;/span&gt; = valore&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
...&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Vediamo la classe all&#39;opera&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;Cella&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;cs = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; Cella&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
Cella&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; ci = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; Cella&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; cs.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getId&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ci.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getId&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;
       &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; Cella.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getCount&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il contatore è condiviso tra tutte le istanze della classe Cella&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Esempio static&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;utilizzo_di_metodi_static&quot; name=&quot;utilizzo_di_metodi_static&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Utilizzo di metodi static&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Cella.getCount() OK&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Cella&amp;lt;Integer&amp;gt;.getCount() NO&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Cella&amp;lt;?&amp;gt;.getCount() NO&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Utilizzo di metodi static&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;inner_class&quot; name=&quot;inner_class&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Inner class&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Java permette di annidare una classe dentro un&#39;altra Se la classe esterna ha un parametro di tipo T:&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Classe interna non statica → può accedere direttamente al parametro di tipo T&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Classe interna statica→ non può accedere (direttamente) al parametro di tipo T&amp;nbsp;&lt;i style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ma esiste un escamotage …&lt;/i&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Inner class&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;inner_class_non_statica&quot; name=&quot;inner_class_non_statica&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Inner class non statica&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Esterna&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;G&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; ...
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Interna1&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; 
  Gg =&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; ...
 &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; ...
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Inner class non statica&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;inner_class_staticaescamotage&quot; name=&quot;inner_class_staticaescamotage&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Inner class statica: escamotage&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Esterna&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;G&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; ...
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; G getPippo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; Interna2&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;G&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;getPippo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Interna2&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;H&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; H getPippo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; ...
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; ...&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:dichiarazioni_di_classi_generiche&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Inner class statica: escamotage&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;div id=&quot;___plusone_0&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; display: inline-block; float: none; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 1px; height: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline; width: 450px;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/5003690147455606385/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-e-generics-parte-3_31.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/5003690147455606385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/5003690147455606385'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-e-generics-parte-3_31.html' title='Introduzione a java e generics parte 4 - Dichiarazioni di variabili'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-1848837610143334993</id><published>2012-01-31T02:03:00.001-08:00</published><updated>2012-01-31T02:03:24.263-08:00</updated><title type='text'>Check than act</title><content type='html'>&lt;code&gt;A cura di Flavio Casadei Della Chiesa&lt;/code&gt;&lt;br /&gt;
&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;
&lt;br /&gt;



Chect then Act, schema di codice nel quale si effettua un controllo prima di eseguire un&#39;azione.
&lt;br /&gt;

&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// Check then act&lt;/span&gt;
.....
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;test&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        azione&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        altraAzione&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
.....&lt;/pre&gt;
utilizzare questo codice in un ambiente concorrente può avere risultati 
inaspettati.
E&#39; infatti possibile che dopo aver eseguito il test la condizione sia 
cambiata, in questo caso potrebbe venir invocata l&#39;azione sbagliata.</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/1848837610143334993/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/check-than-act.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1848837610143334993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1848837610143334993'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/check-than-act.html' title='Check than act'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-7793612244986735273</id><published>2012-01-31T02:02:00.001-08:00</published><updated>2012-01-31T02:02:44.003-08:00</updated><title type='text'>Java Memory Model</title><content type='html'>&lt;h1&gt;
&lt;a href=&quot;&quot; id=&quot;java_memory_model&quot; name=&quot;java_memory_model&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&lt;/i&gt; &lt;br /&gt;


Java Memory Model è il capitolo 17 di Java Language Specification.
&lt;br /&gt;



Un memory model definisce i possibili scenari e regole che governano più
 Thread all&#39;interno di uno stesso sistena.
In memory model determina se alla JVM è permessa una particolare 
esecuzione di un programma.
Le specifiche Java non forzano le implementazioni delle JVM a seguire 
qualche particolare regola per l&#39;esecuzione di un programma; questo da 
agli implementatori della JVM una grande flessibilità spesso utilizzata 
per permettere al compilatore ottimizzazioni aggressive basate spesso 
sul riordino delle istruzioni.
Comunque sia il memory model di Java spcifica che tutte le 
implementazioni devono produrre risultati predicibili da parte del 
programmatore (se vengono da lui/lei seguite certe regole).
&lt;br /&gt;



Il memory model definisce regole per l&#39;utilizzo dei Thread ed il 
comportamento atteso di programmi multithread così da permettere agli 
sviluppatori di impostare di conseguenza i propri programmi.
La responsabilità di evitare RaceCondition, deadlock ed altro sta tutta 
nel lavoro dello sviluppatore.
&lt;br /&gt;
&lt;h1&gt;
&lt;a href=&quot;&quot; id=&quot;triade_della_morte&quot; name=&quot;triade_della_morte&quot;&gt;&lt;/a&gt;&lt;/h1&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/7793612244986735273/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/java-memory-model.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/7793612244986735273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/7793612244986735273'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/java-memory-model.html' title='Java Memory Model'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-3776185444565714014</id><published>2012-01-31T02:01:00.002-08:00</published><updated>2012-01-31T02:01:47.567-08:00</updated><title type='text'>Triade della morte</title><content type='html'>&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;h1&gt;
&lt;a href=&quot;&quot; id=&quot;triade_della_morte&quot; name=&quot;triade_della_morte&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;



Per “Triade della morte” in ambiente multuthread mi riferisco alle tre 
maggiori cause di problemi derivanti da una scorretta gestione della 
concorrenza.
&lt;br /&gt;



La triade è composta da

&lt;br /&gt;

&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:racecondition&quot; title=&quot;java:jtt:racecondition&quot;&gt;RaceCondition&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Riordino delle istruzioni da partedi JVM, CPU, Memoria, ….&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Problemi di visibilità delle 
modifiche effettuate da un Thread (Quando il Thread B può vedere il 
valore corretto della variabile X scritta dal Thread A?)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
Il più famoso antipattern nel quale è presente anche se molto nascosta questa triade è il &lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:doublecheckedlockingidiom&quot; title=&quot;java:jtt:doublecheckedlockingidiom&quot;&gt;Double checked locking idiom&lt;/a&gt;
&lt;br /&gt;


&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/3776185444565714014/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/triade-della-morte.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/3776185444565714014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/3776185444565714014'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/triade-della-morte.html' title='Triade della morte'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-8739034492446556240</id><published>2012-01-31T02:01:00.000-08:00</published><updated>2012-01-31T02:04:17.060-08:00</updated><title type='text'>Put if absent, variante del CheckThenAct</title><content type='html'>&lt;h4&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;put_if_absent_variante_del_checkthenact&quot; name=&quot;put_if_absent_variante_del_checkthenact&quot;&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;
&lt;code&gt;A cura di Flavio Casadei Della Chiesa&lt;/code&gt;&lt;br /&gt;
&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;
&lt;br /&gt;
In questo schema si provvede ed inserire un elemento (di solito) in una collezione solo se questa già non lo contiene.
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// schema generico di put-if-absent&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; HashMap&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; hm .....
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; putIfAbsent&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k , V v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;hm.&lt;span class=&quot;me1&quot;&gt;containsKey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                hm.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k,v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
i problemi sono i soliti derivanti dal &lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:checkthenact&quot; title=&quot;java:jtt:checkthenact&quot;&gt;CheckThenAct&lt;/a&gt;. Nota, come in tutte le azioni composte non basta limitarsi ad aggiungere un synchronized per risolvere il problema.
&lt;br /&gt;
Per eliminare ogni sorta di problema è necessario rendere atomica 
l&#39;operazione.  Per far questo solo un Thread deve essere in grado di 
controllare la presenza o meno della chiave nella mappa e di effettuare 
un&#39;eventuale sostituzione.
&lt;br /&gt;
Un esempio di soluzione può essere il seguente nel quale si istanzia una HashMap all&#39;interno di una classe contenitrice
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; InnerPIA&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; HashMap&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;  delegate = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; HashMap&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; V get&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; delegate.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; put&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k, V v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; delegate.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k,v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; containsKey&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; delegate.&lt;span class=&quot;me1&quot;&gt;containsKey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; putIfAbsent&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k, V v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;delegate.&lt;span class=&quot;me1&quot;&gt;containsKey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
     delegate.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k,v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
.....
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
Nel caso in cui la HashMap sia condivisa e non &lt;code&gt;confinata&lt;/code&gt; in una classe contenitrice è necessario utilizzare un altro tipo di &lt;a class=&quot;wikilink2&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:clientsidelocking&quot; rel=&quot;nofollow&quot; title=&quot;java:jtt:clientsidelocking&quot;&gt;ClientSideLocking&lt;/a&gt;. In questo modo però tutte le classi che condividono la solita istanza della mappa devono utilizzare il solito protocollo.
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; DelegatePIAPIA&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; Map&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;  delegate &lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; DelegatePIA&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Map&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; m&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;delegate&lt;/span&gt; = m&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  V get&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;delegate&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; delegate.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; put&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k, V v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;delegate&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
   delegate.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k,v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;   &lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; containsKey&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;delegate&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; delegate.&lt;span class=&quot;me1&quot;&gt;containsKey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; putIfAbsent&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;K k, V v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;delegate&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;delegate.&lt;span class=&quot;me1&quot;&gt;containsKey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    delegate.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;k,v&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
.....
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
In Java5, precisamente nella concurrent &lt;acronym title=&quot;Application Programming Interface&quot;&gt;API&lt;/acronym&gt;, esiste un modo più immediato: utilizzare una implemantazione di una &lt;a class=&quot;urlextern&quot; href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentMap.html&quot; rel=&quot;nofollow&quot; title=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentMap.html&quot;&gt; ConcurrentMap&lt;/a&gt; come ad esempio la classe &lt;a class=&quot;urlextern&quot; href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html&quot; rel=&quot;nofollow&quot; title=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html&quot;&gt;ConcurrentHashMap&lt;/a&gt;.
&lt;br /&gt;
Queste dispongono di un metodo chiamato appunto &lt;code&gt;putIfAbsent&lt;/code&gt; la cui firma è simile alla precedente; l&#39;unica differenza è che il metodo non è void ma ritorna n elemento di tipo V.
Invocare il metodo 

&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;pippo = mappa.&lt;span class=&quot;me1&quot;&gt;putIfAbsent&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;key,value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
è equivalente a

&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;mappa.&lt;span class=&quot;me1&quot;&gt;containsKey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;key&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; 
      &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; mappa.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;key, value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; mappa.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;key&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
Se la mappa  conteneva un valore precedente per la chiave &lt;code&gt;key&lt;/code&gt; il metodo ritorna tale valore, altrimenti restituisce &lt;code&gt;null&lt;/code&gt;.
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/8739034492446556240/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/put-if-absent-variante-del-checkthenact.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/8739034492446556240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/8739034492446556240'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/put-if-absent-variante-del-checkthenact.html' title='Put if absent, variante del CheckThenAct'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-2450188420033647835</id><published>2012-01-31T02:00:00.000-08:00</published><updated>2012-01-31T02:00:15.854-08:00</updated><title type='text'>Read Write Lock</title><content type='html'>&lt;h1&gt;
&lt;a href=&quot;&quot; id=&quot;read_write_lock&quot; name=&quot;read_write_lock&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;


&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt; &lt;br /&gt;

BOZZA! Sono un meccanismo per una gestione ottimale dell&#39;accesso a 
risorse condivise basato sul principio che se molte azioni possono 
avvenire senza problemi in modo concorrente e solo poche in modo 
esclusivo allora non c&#39;è alcuna necessità di forzare un accersso in 
mutua esclusione alla risorsa condivisa. 

&lt;br /&gt;


&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/2450188420033647835/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/read-write-lock.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/2450188420033647835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/2450188420033647835'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/read-write-lock.html' title='Read Write Lock'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-4252569153690741074</id><published>2012-01-31T01:54:00.000-08:00</published><updated>2012-01-31T02:04:11.446-08:00</updated><title type='text'>Double checked locking idiom</title><content type='html'>&lt;h1&gt;

&lt;/h1&gt;
&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;
&lt;br /&gt;

&lt;div class=&quot;level1&quot;&gt;
&lt;br /&gt;
&lt;code&gt;A cura di Flavio Casadei Della Chiesa&lt;/code&gt;

&lt;br /&gt;
&lt;hr /&gt;
&lt;pre class=&quot;code&quot;&gt;Copyright (c)  2006  Flavio Casadei Della Chiesa.
     è garantito il permesso di copiare, distribuire e/o modificare
     questo documento seguendo i termini della Licenza per
     Documentazione Libera GNU, Versione 1.1 o ogni versione
     successiva pubblicata dalla Free Software Foundation.&lt;/pre&gt;
&lt;hr /&gt;
Il Double Checked Locking Idiom è uno dei più subdoli Antipattern della 
programmazione concorrente in Java. A prima vista sembra un utile 
strumento per migliorare le performance, tuttavia sotto le regole 
dell&#39;attuale &lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javamemorymodel&quot; title=&quot;java:jtt:javamemorymodel&quot;&gt;Java Memory Model&lt;/a&gt; questo schema non funziona &lt;img alt=&quot;:-?&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_confused.gif&quot; /&gt;
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; DoubleCheckedLocking &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource _instance
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource getInstance&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_instance == &lt;span class=&quot;kw2&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;DoubleCheckedLocking.&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_instance == &lt;span class=&quot;kw2&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
                    _instance = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Resource&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
       &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
       &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; _instance&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
Inizializzare un oggetto comporta la scrittura di alcune variabili 
(stato dell&#39;oggetto), pubblicare un oggetto riguarda la scrittura di 
altre variabili (il &lt;code&gt;reference&lt;/code&gt;). Se non si assicura che pubblicare l&#39;oggetto accada prima che un Thread possa leggerne il &lt;code&gt;reference&lt;/code&gt; la scrittura del &lt;code&gt;reference&lt;/code&gt; può essere riordinata con le scritture dello stato dell&#39;oggetto.
&lt;br /&gt;
In tale caso un Thread può vedere un valore aggiornato per il &lt;code&gt;reference&lt;/code&gt;, ma un valore non aggiornato per alcune delle variabili che compongono lo stato dell&#39;oggetto. Si ottiene quindi il &lt;code&gt;reference&lt;/code&gt; ad un oggetto parzialmente costruito.
&lt;br /&gt;
Senza utilizzare tecniche troppo elaborate e spesso inutili è possibile risolvere il problema con il seguente codice
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; EagerInstantiation &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; Resource _instance = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Resource&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource getResource&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; _instance&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// :-)&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/div&gt;
&lt;h2&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;alcuni_riferimenti&quot; name=&quot;alcuni_riferimenti&quot;&gt;Alcuni riferimenti&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
Double Checked Locking Idiom is broken [&lt;a class=&quot;urlextern&quot; href=&quot;http://www.cs.umd.edu/%7Epugh/java/memoryModel/DoubleCheckedLocking.html&quot; rel=&quot;nofollow&quot; title=&quot;http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html&quot;&gt;http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html&lt;/a&gt; declaration]&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
&lt;a class=&quot;urlextern&quot; href=&quot;http://www.javaworld.com/jw-02-2001/jw-0209-double.html&quot; rel=&quot;nofollow&quot; title=&quot;http://www.javaworld.com/jw-02-2001/jw-0209-double.html&quot;&gt;http://www.javaworld.com/jw-02-2001/jw-0209-double.html&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
&lt;a class=&quot;urlextern&quot; href=&quot;http://forum.java.sun.com/thread.jspa?threadID=519106&amp;amp;messageID=2479149&quot; rel=&quot;nofollow&quot; title=&quot;http://forum.java.sun.com/thread.jspa?threadID=519106&amp;amp;messageID=2479149&quot;&gt;http://forum.java.sun.com/thread.jspa?threadID=519106&amp;amp;messageID=2479149&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
&lt;a class=&quot;urlextern&quot; href=&quot;http://www-128.ibm.com/developerworks/java/library/j-dcl.html&quot; rel=&quot;nofollow&quot; title=&quot;http://www-128.ibm.com/developerworks/java/library/j-dcl.html&quot;&gt;http://www-128.ibm.com/developerworks/java/library/j-dcl.html&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/4252569153690741074/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/double-checked-locking-idiom.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4252569153690741074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4252569153690741074'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/double-checked-locking-idiom.html' title='Double checked locking idiom'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-7550309036627091038</id><published>2012-01-31T01:53:00.001-08:00</published><updated>2012-01-31T02:04:01.853-08:00</updated><title type='text'>Nested Monitor Problem</title><content type='html'>&lt;h1&gt;

&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;
&lt;br /&gt;

&lt;br /&gt;
&lt;code&gt;&#39; Versione da riguardare &lt;/code&gt;&#39;
&lt;br /&gt;
&lt;code&gt;&#39; A cura di Flavio Casadei Della Chiesa &lt;/code&gt;&#39;
&lt;br /&gt;
Il Nested Monitor Problem (NMP) si ha in genere quando un Thread 
entrando nella coda di wait di un oggetto “mette a dormire con se” il 
lock dell&#39;unico oggetto che può “risvegliare” tale Thread tramite una 
notify*().
&lt;br /&gt;
In generale  è buona norma &lt;code&gt;&#39;non&lt;/code&gt;&#39; mettere un Thread in una 
coda di wait se non si è sicuri che quancun altro Thread sia in grado di
 eseguire una notify* su di essa (e quindi liberare i Thread in attesa).
 A volte  nonostante  sia stato predisposto un adeguato sistema di 
metodi di notifica e attesa può accadere che il metodo di notifica non 
possa essere eseguito in quanto il suo accesso è “sbarrato” da un lock 
che non potrà mai essere acquisito. Vediamo un esempio  di NMP
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Inner &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; cond = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; await &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;cond&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; wait &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; e&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;co1&quot;&gt;// .....&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; signal &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    cond = c&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    notifyAll &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Outer &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; Inner inner_ = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Inner &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nota! non è accessibile all&#39;esterno&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; process &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    inner_.&lt;span class=&quot;me1&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; set &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    inner_.&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
Nella classe denominata Inner i metodi di attesa e notifica sono 
giustamente messi pubblici e synchronized; la classe Outer si limita 
solamente ad utilizzare tali metodi in blocchi sincronizzati al fine di 
evitare accessi concorrenti. A prima vista sembrerebbe tutto a posto 
tuttavia in questo frammento di codice si cela un&#39;insidia poco visibile.
&lt;br /&gt;
Prima di entrare nella coda di wait di un oggetto X, un generico  Thread
 T ne deve acquisire il lock intrinseco (senza se e senza ma), una volta
 entrato in wait tale lock viene rilasciato e messo a disposizione di 
altri Thread.  Fin qua niente di nuovo, tuttavia se leggiamo 
attentamente non ho scritto che &lt;code&gt;&#39;tutti&lt;/code&gt;&#39; i lock acquisiti 
dal Thread T vengono rilasciati; ed infatti solo il lock intrinseco 
viene rilasciato, gli altri no. Se osserviamo il NMP da vicino si nota 
che per un Thread T1 che invoca Outer.process() acquisisce ben due lock:
 quello di Outer e quello di Inner, ma una volta entrato in wait (su 
inner) il lock di Outer rimane acquisito e non rilasciato. Ogni altro 
Thread T2  che prova ad invocare Outer.set() rimane bloccato 
all&#39;infinito in quanto il lock di Outer è in possesso di T1. Non esiste 
quindi alcun modo per riacquisire il lock di Outer in quanto nessun 
Thread è in grado di eseguire la notify().
&lt;br /&gt;
La Nested in Nested Monitor Problem deriva dal fatto che la classe che 
esegue la wait di norma è una classe interna/annidata della classe che 
espone i metodi ai client; questa di norma è una buona tecnica di 
confinamento che limita alcuni problemi di concorrenza anche se, come 
abbiamo visto, può generare probkemi ben più gravi.
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Outer &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; Nested _nested = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nota! non è accessibile all&#39;esterno&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; process &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; set &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; cond = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; await &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;cond&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
                                &lt;span class=&quot;kw2&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; wait &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;kw2&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; e&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;co1&quot;&gt;// .....&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; signal &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        cond = c&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        notifyAll &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/div&gt;
&lt;h5&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;nested_monitor_solution&quot; name=&quot;nested_monitor_solution&quot;&gt;Nested Monitor Solution?&lt;/a&gt;&lt;/h5&gt;
&lt;div class=&quot;level5&quot;&gt;
Beh le soluzioni sono molte e non tutte applcabili in ogni contesto. 
Analizziamo una ipotetica soluzione ne propongo una basata su classi 
annidate (nested)
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; NestedMonitor &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; Nested _nested = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nota! non è accessibile all&#39;esterno&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; process &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nessun lock acquisito&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; set &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nessun lock acquisito&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; cond = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; await &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;cond&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
                                &lt;span class=&quot;kw2&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; wait &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;kw2&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; e&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;currentThread&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;interrupt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;co1&quot;&gt;// .....&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; signal &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        cond = c&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        notifyAll &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
Come si nota, la soluzione consiste nel rimuovere la keyword 
synchronized dai metodi della classe Outer, più qualche “aggiunta” ….. 
Non si notano a prima vista grossi problemi, ma riflettendo meglio non è
 esclusa la possibilità di generare il solito problema nel caso in cui 
una classe cliente tenti un client side locking su una istanza della 
classe Nestedmonitor.
&lt;br /&gt;
Attenzione quindi a chiamare metodi “alieni” con un lock acquisito!
&lt;br /&gt;
Propongo due versioni alternative di una ipotetica soluzione, presto 
seguiranno commenti … spero pure i vostri! Contattatemi pure  
all&#39;indirizzo fcasadei CHIOCCIOLA gmail  PUNTO com
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Outer &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; Nested _nested = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nota! non è accessibile all&#39;esterno&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; lock = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Object&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; process &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nessun lock acquisito&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; set &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nessun lock acquisito&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; cond = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; await &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;lock&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;//prendo il lock &quot;giusto&quot;&lt;/span&gt;
                                &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;cond&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
                                        &lt;span class=&quot;kw2&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; lock.&lt;span class=&quot;me1&quot;&gt;wait&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                                &lt;span class=&quot;kw2&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; e&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;currentThread&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;interrupt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                                &lt;span class=&quot;co1&quot;&gt;// .....&lt;/span&gt;
                        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; signal &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;lock&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                                cond = c&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                                lock.&lt;span class=&quot;me1&quot;&gt;notifyAll&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; NestedOuter &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; Nested _nested = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nota! non è accessibile all&#39;esterno&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; process &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nessun lock acquisito&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; set &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                _nested.&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// nessun lock acquisito&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Nested &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; cond = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; await &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;NestedOuter.&lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;//prendo il lock &quot;giusto&quot;&lt;/span&gt;
                                &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;cond&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
                                        &lt;span class=&quot;kw2&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; NestedOuter.&lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;wait&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                                &lt;span class=&quot;kw2&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; e&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;currentThread&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;interrupt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                                &lt;span class=&quot;co1&quot;&gt;// .....&lt;/span&gt;
                        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; signal &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;boolean&lt;/span&gt; c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;NestedOuter.&lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
                                cond = c&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                                NestedOuter.&lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;notifyAll&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;clearer&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;user&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/7550309036627091038/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/nested-monitor-problem.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/7550309036627091038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/7550309036627091038'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/nested-monitor-problem.html' title='Nested Monitor Problem'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-4899505652812349670</id><published>2012-01-31T01:52:00.002-08:00</published><updated>2012-01-31T02:03:46.732-08:00</updated><title type='text'>Unsafe lazy instantiation</title><content type='html'>&lt;h1&gt;

&lt;/h1&gt;
&lt;i&gt;Leggi l&#39;articolo completo su &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javaconcorrenza&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;
&lt;br /&gt;

&lt;div class=&quot;level1&quot;&gt;
&lt;br /&gt;
In questo Antipattern sono presenti vari problemi, il più ovvio è quello alla creazione di &lt;code&gt;finti&lt;/code&gt; Singleton. L&#39;accesso non esclusivo alla &lt;code&gt;getInstance()&lt;/code&gt; può favorire la creazione di più istanze differenti della risorsa. Altri e più subdoli problemi sono discussi nel &lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:doublecheckedlockingidiom&quot; title=&quot;java:jtt:doublecheckedlockingidiom&quot;&gt;Double checked locking idiom&lt;/a&gt;
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; UnsafeLazyInstantiation &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource _instance&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource getInstance&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_instance == &lt;span class=&quot;kw2&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
            _instance = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Resource&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// unsafe publication :-P&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; _instance&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
.......
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
La soluzione immediata al problema dei finiti Singleton è la seguente
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; SimpleLazyInstantiation &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource _instance&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource getInstance&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_instance == &lt;span class=&quot;kw2&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
            _instance = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Resource&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;//  sate publication :-|&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; _instance&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
.......
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
si nota in fatti che il metodo &lt;code&gt;getInstance()&lt;/code&gt; è sincronizzato, non è quindi possibile che due o più Thread vi accedano in contemporanea.
&lt;br /&gt;
Nonostante il precedente codice sia sicuro può non essere sempre 
un&#39;ottima cosa sincronizzare il metodo di istanziazione. Java permette 
il caricamento &lt;code&gt;lazy&lt;/code&gt; di una classe tramite il 
LazyClassLoading utilizzabile tramite gli inizializzatori statici. La 
versione pulita per l&#39;instanziazione lazy è la seguente

&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; EagerInstantiation &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; Resource _instance = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Resource&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Resource getResource&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; _instance&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// :-)&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/4899505652812349670/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/unsafe-lazy-instantiation.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4899505652812349670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4899505652812349670'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/unsafe-lazy-instantiation.html' title='Unsafe lazy instantiation'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-3286839579814756486</id><published>2012-01-31T01:52:00.000-08:00</published><updated>2012-01-31T01:52:14.880-08:00</updated><title type='text'>Unsafe Publication</title><content type='html'>&lt;h1&gt;
&lt;a href=&quot;&quot; id=&quot;unsafe_publication&quot; name=&quot;unsafe_publication&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;


&lt;h1&gt;
&lt;a href=&quot;http://www.flaviocdc.net/wiki/java:jtt:unsafepublication&quot;&gt;Unsafe Publication&lt;/a&gt;&lt;/h1&gt;
&lt;br /&gt;

Pubblicare un oggetto significa renderlo visibile agli altri; 
pubblicarlo in modo insicuro spesso vuol dire renderne visibile il 
reference prima che l&#39;oggetto sia completamente costruito.
&lt;br /&gt;



La pubblicazione di un oggetto comporta la scrittura di una variabile, 
il reference, la creazione di un oggetto comporta la scrittuta di altre 
variabili, lo stato dell&#39;oggetto. Se non si ha la garanzia certa che la 
creazione dell&#39;oggetto preceda la pubblicazione del reference allora e&#39; 
possible entrare in possesso di un oggetto non perfettamente costruito. 
Il più celebre esempio di Unsafe Publication derivante da un non 
corretto ordinamento de eventi è il &lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:doublecheckedlockingidiom&quot; title=&quot;java:jtt:doublecheckedlockingidiom&quot;&gt;Double checked locking idiom&lt;/a&gt; discusso nella sezione &lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:jtt:javathreadtrabocchetti&quot; title=&quot;java:jtt:javathreadtrabocchetti&quot;&gt;Java, Thread e trabocchetti&lt;/a&gt;. 

&lt;br /&gt;


&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/3286839579814756486/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/unsafe-publication.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/3286839579814756486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/3286839579814756486'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/unsafe-publication.html' title='Unsafe Publication'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-6713869326517896041</id><published>2012-01-31T01:48:00.000-08:00</published><updated>2012-01-31T01:48:28.967-08:00</updated><title type='text'>Python Shapefile to CSV converter</title><content type='html'>&lt;h1&gt;
&lt;br /&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;


&lt;i&gt;Read the full article at &lt;a href=&quot;http://www.flaviocdc.net/wiki/python:en:export_a_shapefile_to_csv&quot;&gt;flaviocdc.net&lt;/a&gt;&lt;/i&gt; &lt;br /&gt;
&lt;br /&gt;
This script exports the data content (tabular data) of a shapefile and the bounding box of every object to csv format&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;

&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;
Shapefile export
&quot;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; shapelib, dbflib, &lt;span class=&quot;kw3&quot;&gt;string&lt;/span&gt;
&amp;nbsp;
SHAPEFILE=&lt;span class=&quot;st0&quot;&gt;&quot;shpname&quot;&lt;/span&gt;
&amp;nbsp;
shp = shapelib.&lt;span class=&quot;me1&quot;&gt;ShapeFile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
dbf = dbflib.&lt;span class=&quot;me1&quot;&gt;DBFFile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
sCount = shp.&lt;span class=&quot;me1&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
dCount = dbf.&lt;span class=&quot;me1&quot;&gt;record_count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; sCount &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; dCount:
 &lt;span class=&quot;kw1&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Error: shape  number %s (%d) differs from  dbf records (%d) &quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE,sCount,dCount&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#print l&#39;header!&lt;/span&gt;
header = dbf.&lt;span class=&quot;me1&quot;&gt;read_record&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#print header.keys()&lt;/span&gt;
intestazione = &lt;span class=&quot;kw3&quot;&gt;string&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;header.&lt;span class=&quot;me1&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&quot;|&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
intestazione += &lt;span class=&quot;st0&quot;&gt;&quot;|XMIN|YMIN|XMAX|YMAX&quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; intestazione
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#read the dbf file &lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;dbf.&lt;span class=&quot;me1&quot;&gt;record_count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;:
 rc = dbf.&lt;span class=&quot;me1&quot;&gt;read_record&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 sc = shp.&lt;span class=&quot;me1&quot;&gt;read_object&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 row = &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; value &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; rc.&lt;span class=&quot;me1&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;:
  row += &lt;span class=&quot;st0&quot;&gt;&quot;%s|&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;co1&quot;&gt;#print the  extent/envelope&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; = sc.&lt;span class=&quot;me1&quot;&gt;extents&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 xmin = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 ymin = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 xmax = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 ymax = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
&amp;nbsp;
 row += &lt;span class=&quot;st0&quot;&gt;&quot;%f|%f|%f|%f&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;xmin,ymin,xmax,ymax&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; row
 &lt;span class=&quot;co1&quot;&gt;#print &quot;\n&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;clearer&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;user&quot;&gt;

              &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/6713869326517896041/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/python-shapefile-to-csv-converter_31.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/6713869326517896041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/6713869326517896041'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/python-shapefile-to-csv-converter_31.html' title='Python Shapefile to CSV converter'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-8937806468846827218</id><published>2012-01-20T01:09:00.001-08:00</published><updated>2012-01-20T01:09:57.582-08:00</updated><title type='text'>Banale esempio di utilizzo dell&#39;interfaccia Future</title><content type='html'>&lt;h1&gt;
&lt;a href=&quot;&quot; id=&quot;esempio_future&quot; name=&quot;esempio_future&quot;&gt;Esempio future&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;



In questa pagina si vuole descrivere il funzionamento dell&#39;interfaccia &lt;code&gt;&#39;java.util.concurrent.Future&lt;/code&gt;&#39;. 
Le &lt;acronym title=&quot;Application Programming Interface&quot;&gt;API&lt;/acronym&gt; Java 5 dicono che 
&lt;code&gt;un Future rappresenta il risultato di una computazione asincrona&lt;/code&gt;, …, 
&lt;code&gt; il risultato può essere recuperato con il metodo get solamente 
quando la computazione è completata, eventualmente bloccando il 
chiamante fino a quando il risultato non è pronto&lt;/code&gt;.
&lt;br /&gt;


&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:jtt:esempiofuture&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2&gt;
&lt;a href=&quot;&quot; id=&quot;esempio&quot; name=&quot;esempio&quot;&gt;Esempio&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;



In questo esempio si vogliono testare due processori &lt;code&gt;&#39;p1&lt;/code&gt;&#39; e &lt;code&gt;&#39;p2&lt;/code&gt;&#39;
 e si da loro da calcolare un risultato.
Il testa ha successo se entrambi i processori danno lo stesso risultato 
altrimenti fallisce.
Il calcolo del risultato è piuttosto complesso, si delega quindi ad un 
esecutore l&#39;esecuzione del calcolo su entrambi i processori e si aspetta
 che questo abbia finito prima di confrontare i risultati.
&lt;code&gt;&#39;NOTA: l&#39;esempio è assai semplice: non ci sono calcoli complicati, c&#39;è solo un random che può far guastare un processore&lt;/code&gt;&#39;.
&lt;br /&gt;

&lt;pre class=&quot;code java&quot;&gt;&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;package&lt;/span&gt; test.&lt;span class=&quot;me1&quot;&gt;esecutore&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;coMULTI&quot;&gt;/**
 * Usare solo a scopo didattico!
 */&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import java.util.concurrent.Callable;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import java.util.concurrent.Executor;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import java.util.concurrent.FutureTask;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import junit.framework.TestCase;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; TestFuture &lt;span class=&quot;kw2&quot;&gt;extends&lt;/span&gt; TestCase &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; 
 &lt;span class=&quot;co1&quot;&gt;//valore atteso dal calcolo&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt;  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ADouble+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Double&lt;/span&gt;&lt;/a&gt; CLEAN = &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;co1&quot;&gt;//probabilità di successo del primo procesore&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; okProb1 = &lt;span class=&quot;nu0&quot;&gt;0.6&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;co1&quot;&gt;//probabilità di successo del secondo processore&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt;  &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; okProb2 = &lt;span class=&quot;nu0&quot;&gt;0.65&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; testFoo&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Exception&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;//Esecutore dei task&lt;/span&gt;
  Executor executor = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; ThreadPerTaskExecutor&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;//Future del primo processore&lt;/span&gt;
  FutureTask&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;Double&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; proc1 =
   &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; FutureTask&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;Double&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Callable&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;Double&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ADouble+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Double&lt;/span&gt;&lt;/a&gt; call&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
     &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ADouble+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Double&lt;/span&gt;&lt;/a&gt; retval = CLEAN&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; d = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AMath+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Math&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt; d &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; okProb1&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
      retval = d&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AMath+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Math&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;500&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
     &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; retval&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;//  Future del secondo processore&lt;/span&gt;
  FutureTask&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;Double&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; proc2 =
   &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; FutureTask&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;Double&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Callable&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;Double&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ADouble+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Double&lt;/span&gt;&lt;/a&gt; call&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
     &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ADouble+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Double&lt;/span&gt;&lt;/a&gt; retval = CLEAN&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; d = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AMath+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Math&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt; d &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; okProb2&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
      retval = d&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
     &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AMath+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Math&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;500&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; retval&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;//eseguo in modo asincrono entrambi i calcoli&lt;/span&gt;
  executor.&lt;span class=&quot;me1&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;proc1&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  executor.&lt;span class=&quot;me1&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;proc2&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;//prendo i risultati&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ADouble+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Double&lt;/span&gt;&lt;/a&gt; p1 = proc1.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ADouble+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Double&lt;/span&gt;&lt;/a&gt; p2 = proc2.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;// li confronto&lt;/span&gt;
  assertEquals&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;p1, p2&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
 &lt;span class=&quot;co1&quot;&gt;//Semplice esecutore asincrono. Non usare in produzione!!!!!&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; ThreadPerTaskExecutor &lt;span class=&quot;kw2&quot;&gt;implements&lt;/span&gt; Executor &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; execute&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ARunnable+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Runnable&lt;/span&gt;&lt;/a&gt; r&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;r&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot;&gt;
&lt;form action=&quot;/wiki/java:jtt:esempiofuture&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;div class=&quot;clearer&quot;&gt;
&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/8937806468846827218/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/banale-esempio-di-utilizzo.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/8937806468846827218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/8937806468846827218'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/banale-esempio-di-utilizzo.html' title='Banale esempio di utilizzo dell&#39;interfaccia Future'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-4789733579808419588</id><published>2012-01-20T01:08:00.001-08:00</published><updated>2012-01-20T01:08:28.270-08:00</updated><title type='text'>Usare il provider filesystem di JNDI</title><content type='html'>&lt;div class=&quot;level1&quot;&gt;



nota: questo codice è instabile (alfa) … da notare la necessità di 
creare le varie directory dell&#39;albero jndi. Nell&#39;esempio viene creata 
solo la base ma nel caso di alberi più complessi tutte le sottocartelel 
dovono essere create; chiaramente sto indagando su come fare per ovviare
 al problema …&lt;br /&gt;
&lt;br /&gt;

&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;package&lt;/span&gt; test.&lt;span class=&quot;me1&quot;&gt;jndi&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import java.io.File;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import java.util.Hashtable;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import javax.naming.Context;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import javax.naming.InitialContext;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import javax.naming.Reference;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import javax.naming.StringRefAddr;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import test.jndi.mystuff.ClasseInutileFactory;&lt;/span&gt;
&lt;span class=&quot;co2&quot;&gt;import junit.framework.TestCase;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; SimpleJndi &lt;span class=&quot;kw2&quot;&gt;extends&lt;/span&gt; TestCase &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;String&lt;/span&gt;&lt;/a&gt; JDBC_PIPPO = &lt;span class=&quot;st0&quot;&gt;&quot;data/inutile&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;final&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;String&lt;/span&gt;&lt;/a&gt; PIPPO = &lt;span class=&quot;st0&quot;&gt;&quot;pippo&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; Hashtable&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;String,String&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; props = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Hashtable&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;String,String&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;String&lt;/span&gt;&lt;/a&gt; dirname = &lt;span class=&quot;st0&quot;&gt;&quot;/tmp/&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  props.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;java.naming.factory.initial&quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&quot;com.sun.jndi.fscontext.RefFSContextFactory&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  props.&lt;span class=&quot;me1&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;java.naming.provider.url&quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&quot;file://&quot;&lt;/span&gt; +
    dirname&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AFile+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;File&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;dirname&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;mkdirs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// la directory deve esistere &lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; setUp&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Exception&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;setUp&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; tearDown&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Exception&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;tearDown&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; testFactory&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Exception&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInitialContext+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InitialContext&lt;/span&gt;&lt;/a&gt; ctx = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInitialContext+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InitialContext&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AReference+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Reference&lt;/span&gt;&lt;/a&gt; ref = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AReference+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Reference&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;ClasseInutile.&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;getName&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;,
    ClasseInutileFactory.&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;getName&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  ref.&lt;span class=&quot;me1&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AStringRefAddr+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;StringRefAddr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&quot;pippoName&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  ctx.&lt;span class=&quot;me1&quot;&gt;rebind&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;PIPPO, ref&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AContext+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Context&lt;/span&gt;&lt;/a&gt; ic2 = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInitialContext+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InitialContext&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  ClasseInutile ci = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;ClasseInutile&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;ic2.&lt;span class=&quot;me1&quot;&gt;lookup&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;PIPPO&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ASystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;ci&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  ci = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;ClasseInutile&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;ic2.&lt;span class=&quot;me1&quot;&gt;lookup&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;PIPPO&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ASystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;ci&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; aatestSimple&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Exception&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;
  &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AContext+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Context&lt;/span&gt;&lt;/a&gt; ctx = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInitialContext+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;InitialContext&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  ClasseInutile c = &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; ClasseInutile&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  c.&lt;span class=&quot;me1&quot;&gt;setName&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;String&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;valueOf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AMath+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Math&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  ctx.&lt;span class=&quot;me1&quot;&gt;rebind&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;PIPPO,&lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AReference+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;Reference&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;c.&lt;span class=&quot;me1&quot;&gt;getClass&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;getName&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  ClasseInutile cu = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;ClasseInutile&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;ctx.&lt;span class=&quot;me1&quot;&gt;lookup&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;PIPPO&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  assertEquals&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;cu,c&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/4789733579808419588/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/usare-il-provider-filesystem-di-jndi.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4789733579808419588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4789733579808419588'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/usare-il-provider-filesystem-di-jndi.html' title='Usare il provider filesystem di JNDI'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-1591883345767821156</id><published>2012-01-20T01:04:00.001-08:00</published><updated>2012-01-20T01:04:50.635-08:00</updated><title type='text'>Esportazione di shapefile da python</title><content type='html'>&lt;div class=&quot;level1&quot;&gt;



Il seguente script esporta in formato “pseudo csv” i dati dello shapefile e la “bounding box” di ogni singola figura censita
&lt;br /&gt;

&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;
Esportazione dei dati di uno shapefile
&quot;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; shapelib, dbflib, &lt;span class=&quot;kw3&quot;&gt;string&lt;/span&gt;
&amp;nbsp;
SHAPEFILE=&lt;span class=&quot;st0&quot;&gt;&quot;nomeshp&quot;&lt;/span&gt;
&amp;nbsp;
shp = shapelib.&lt;span class=&quot;me1&quot;&gt;ShapeFile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
dbf = dbflib.&lt;span class=&quot;me1&quot;&gt;DBFFile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
sCount = shp.&lt;span class=&quot;me1&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
dCount = dbf.&lt;span class=&quot;me1&quot;&gt;record_count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; sCount &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; dCount:
 &lt;span class=&quot;kw1&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Errore: numero oggeti in shape %s (%d) diverso da record  dbf (%d) &quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE,sCount,dCount&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#stampo l&#39;header!&lt;/span&gt;
header = dbf.&lt;span class=&quot;me1&quot;&gt;read_record&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#print header.keys()&lt;/span&gt;
intestazione = &lt;span class=&quot;kw3&quot;&gt;string&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;header.&lt;span class=&quot;me1&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&quot;|&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
intestazione += &lt;span class=&quot;st0&quot;&gt;&quot;|XMIN|YMIN|XMAX|YMAX&quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; intestazione
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#scandisco riga per riga il file dbf&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;dbf.&lt;span class=&quot;me1&quot;&gt;record_count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;:
 rc = dbf.&lt;span class=&quot;me1&quot;&gt;read_record&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 sc = shp.&lt;span class=&quot;me1&quot;&gt;read_object&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 row = &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; value &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; rc.&lt;span class=&quot;me1&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;:
  row += &lt;span class=&quot;st0&quot;&gt;&quot;%s|&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;co1&quot;&gt;#aggiungo la extent/envelope&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; = sc.&lt;span class=&quot;me1&quot;&gt;extents&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 xmin = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 ymin = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 xmax = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 ymax = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
&amp;nbsp;
 row += &lt;span class=&quot;st0&quot;&gt;&quot;%f|%f|%f|%f&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;xmin,ymin,xmax,ymax&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; row
 &lt;span class=&quot;co1&quot;&gt;#print &quot;\n&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/1591883345767821156/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/esportazione-di-shapefile-da-python.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1591883345767821156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1591883345767821156'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/esportazione-di-shapefile-da-python.html' title='Esportazione di shapefile da python'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-4402399913571406923</id><published>2012-01-17T08:55:00.000-08:00</published><updated>2012-01-17T08:56:07.549-08:00</updated><title type='text'>Introduzione a java e generics parte 3 - Confronti tra element</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;level1&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 3px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
PREV&amp;nbsp;&lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; style=&quot;color: rgb(0, 153, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; title=&quot;java:generics:subtiping_wildcards&quot;&gt;Subtyping &amp;amp; wildcards&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Parleremo di Comparable&amp;lt;T&amp;gt;&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Confrontare elementi&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Trovare massimo e minimo in una collezione&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Metodi bridge&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Confronti tra elementi&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;comparable&quot; name=&quot;comparable&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Comparable&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;interface&lt;/span&gt; Comparable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; compareTo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T elem&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il metodo&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;compareTo&lt;/strong&gt;&amp;nbsp;restituisce un valore che è negativo, zero o positivo a seconda che il parametro fornito sia rispettivamente minore, uguale o maggiore del parametro implicito (this). Quando una classe implementa Comparable l&#39;ordine specifcato dalla sua interfaccia è chiamato ordine naturale per la classe.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Comparable&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;mele_con_mele_e_pere_con_pere&quot; name=&quot;mele_con_mele_e_pere_con_pere&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Mele con mele e pere con pere&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; i0 = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; i1 = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;assert&lt;/span&gt; i0.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;compareTo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;i1&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; s0 = &lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;zero&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; s1 = &lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;uno&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;assert&lt;/span&gt; s0.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;compareTo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;s1&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
(Di norma) un oggetto di una classe può essere confrontato solo con oggetti della stessa classe (pere con pere, mele con mele)&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Posso confrontare mele con pere?&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ANumber+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Number&lt;/span&gt;&lt;/a&gt; n1 = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ANumber+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Number&lt;/span&gt;&lt;/a&gt; npi = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;assert&lt;/span&gt; n1.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;compareTo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;npi&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Errore di compilazione&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Notare il boxing&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il codice non compila!&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Number non implementa Comparable&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Mele con mele  e pere con pere&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;consistente_con_l_uguaglianza&quot; name=&quot;consistente_con_l_uguaglianza&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Consistente con l&#39;uguaglianza&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;x.equals(y) ↔ x.compareTo(y) == 0&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Attenzione all&#39;inserimento in SortedList ecc …&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
compareTo VS equals&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
x.equals(null) → true, false&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
x.compareTo(null) → NullPointerException&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
BigDecimal non è consistente con l&#39;uguaglianza&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Consistente con l&#39;uguaglianza&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;contratto_per_comparable&quot; name=&quot;contratto_per_comparable&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Contratto per comparable&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Antisimmetrica&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
sgn(x.compareTo(y)) = - sgn(y.compareTo(x))&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Transitiva&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
x.compareTo(y) &amp;lt; 0 &amp;amp; y.compareTo(z) &amp;lt; 0 → x.compareTo(z) &amp;lt;0&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Congruenza&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
x.compareTo(y) == 0 → sgn(x.compareTo(z)) == sgn(y.compareTo(z))&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Rifessiva&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
x.compareTo(x) == 0&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sgn(x) è il segno di x: -1 negativo, 0 zero, 1 positivo&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Contratto per comparable&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;overflow_underflow&quot; name=&quot;overflow_underflow&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Overflow / underflow&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Attenzione&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; compareTo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt; - o.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
NO! Può generare overfow: confrontando un numero negativo grande in modulo con un grande numero positivo → Si può superare Integer.MAX_VALUE&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Overflow&lt;/strong&gt;:&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Numero troppo grande in valore assoluto Maggiore di Integer.MAX_VALUE o minore di Integer.MIN_VALUE&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Underfow&lt;/strong&gt;:&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
numero, diverso da zero, troppo piccolo in valore assoluto per essere rappresentato dalla macchina&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Overflow / underflow&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;trovare_il_massimo_di_una_collezione&quot; name=&quot;trovare_il_massimo_di_una_collezione&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Trovare il massimo di una collezione&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; Comparable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; T max &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
 T cand = coll.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;iterator&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;T elem: coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;cand.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;compareTo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;elem&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; cand = elem&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; cand&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Trovare il massimo di una collezione&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;limiti&quot; name=&quot;limiti&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Limiti&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; Comparable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
si dice che T è limitato da Comparable T Si è quindi posto un limite sul tipo di T. Il limite può essere ricorsivo&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; C&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T,U&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; , U &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; D&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T,U&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Limiti&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;esempi&quot; name=&quot;esempi&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Esempi&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; stringhe = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;mondo&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// ok&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;assert&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ACollections+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Collections&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;stringhe&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;mondo&quot;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// ok &lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; interi = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;assert&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ACollections+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Collections&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;interi&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// ok&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; numeri = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt; ,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt; ,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3&lt;/span&gt; ,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;4&lt;/span&gt; ,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;5&lt;/span&gt; ,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// ok&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;assert&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ACollections+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Collections&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;numeri&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// NO! Il codice con compila&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Esempi&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;e_possibile_utilizzare_firme_il_piu_generiche_possibile&quot; name=&quot;e_possibile_utilizzare_firme_il_piu_generiche_possibile&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;E&#39; possibile utilizzare firme il più generiche possibile&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; Comparable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; T max &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; coll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; Comparable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;super&lt;/span&gt; T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; T max &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; T &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; elements&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&lt;/span&gt; Comparable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;super&lt;/span&gt; T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; T max&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt; Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; coll &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;E&#39; possibile utilizzare firme il più generiche possibile&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;limiti_multipli&quot; name=&quot;limiti_multipli&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Limiti multipli&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;S &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; Readable &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&lt;/span&gt; Closeable,
 T &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/span&gt; Appendable &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;amp;&lt;/span&gt; Closeable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;void&lt;/span&gt; copy&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;S src, T dest, &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; dim&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;throws&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AIOException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;IOException&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
  CharBuffer buff = CharBuffer.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;allocate&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;dim&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; i = src.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;buff&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;i &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;= &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
   buff.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;flip&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// prepara per la scrittura&lt;/span&gt;
   dest.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;buff&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
   buff.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
   i = src.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;buff&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
src.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt; dest.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Limiti multipli&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;metodi_bridge&quot; name=&quot;metodi_bridge&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Metodi bridge&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Generics sono implementati mediante&amp;nbsp;&lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:generics:type_erasure&quot; style=&quot;color: rgb(0, 153, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; title=&quot;java:generics:type_erasure&quot;&gt;Type erasure&lt;/a&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il bytecode è piuttosto simile (e compatibile) con la versione senza Generics&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Classi che implementano interfacce generiche (es: Comparable&amp;lt;T&amp;gt; )&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Vengono aggiunti dal compilatore alcuni metodi detti metodi bridge&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; Foo1 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implements&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AComparable+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Comparable&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;final&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; value &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; Foo1&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; value&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt; = value&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; compareTo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; compareTo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Foo1&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; compareTo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Foo1 o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; value.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;compareTo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;o.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
 &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Esempio di Comparable senza Generics. Il metodo classico chiama il metodo ridefnito dopo un cast (double dispatch). Attenzione! Java supporta il binding dinamico solamente sull&#39;argomento implicito (this) e non sui parametri formali (quelli tra parentesi)&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Metodi bridge&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;con_i_generics&quot; name=&quot;con_i_generics&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Con i generics&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; Foo2 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implements&lt;/span&gt;
Comparable&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Foo2&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;final&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; value&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; Foo2&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; value&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt; = value&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; compareTo&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;Foo2 o&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; value.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;compareTo&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;o.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
C&#39;è solo un metodo nel codice sorgente Vediamo cosa succede nel bytecode generato dal compilatore …&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Con i generics&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;bytecode_generato_con_metodo_bridge&quot; name=&quot;bytecode_generato_con_metodo_bridge&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Bytecode generato con metodo bridge&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AMethod+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Method&lt;/span&gt;&lt;/a&gt; m :
Foo2.&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getMethods&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;m.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getName&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;
.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;compareTo&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ASystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;
m.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;toGenericString&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;----------------------
public int Foo2.compareTo(Foo2)
public bridge int Foo2.compareTo(java.lang.Object)
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Bytecode generato con metodo bridge&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;override_covariante_finalmente&quot; name=&quot;override_covariante_finalmente&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Override covariante (finalmente!)&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In java ⇐ 1.4 un metodo può sovrascrivere un altro ↔ le due frme coincidono esattamente.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In java &amp;gt;= 5 un metodo può sovrascrivere un altro se gli argomenti sono identici ed il tipo di ritorno del metodo riscrivente è un sottotipo del tipo di ritorno del metodo riscritto.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Override covariante (finalmente!)&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;override_1.4&quot; name=&quot;override_1.4&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Override &amp;lt;= 1.4&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; OldPunto &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; x&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; y&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; OldPunto&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; x, &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; y&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;x&lt;/span&gt; = x&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;y&lt;/span&gt; = y&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; clone&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; OldPunto&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;x, y&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Object ha un metodo clone() che restituisce un&amp;nbsp;&lt;em class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;Object&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Override &amp;lt;= 1.4&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;override_5.0&quot; name=&quot;override_5.0&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Override &amp;gt;= 5.0&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/span&gt; NewPunto &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; x&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; y&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; NewPunto&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; x, &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; y&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;x&lt;/span&gt; = x&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;y&lt;/span&gt; = y&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public&lt;/span&gt; NewPunto clone&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt; NewPunto&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(&lt;/span&gt;x, y&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
NewPunto è sottotipo di Object quindi&amp;nbsp;&lt;em class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;non ci sono errori di compilazione&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Vediamo se ci sono dei bridge:&lt;/div&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;public NewPunto NewPunto.clone()
public bridge java.lang.Object NewPunto.clone() throws java.lang.CloneNotSupportedException
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Override &amp;gt;= 5.0&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;ancora_sui_bridge&quot; name=&quot;ancora_sui_bridge&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Ancora sui bridge&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
A seconda del compilatore la dicitura bridge:&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Può non comparire!&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Può essere sostituita da volatile! (bug)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Altro …&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Nel compilatore java6 di Apple non compare bridge&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:confronti_tra_elementi&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Ancora sui bridge&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;div id=&quot;___plusone_0&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; display: inline-block; float: none; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 1px; height: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline; width: 450px;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/4402399913571406923/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-e-generics-parte-3.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4402399913571406923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/4402399913571406923'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-e-generics-parte-3.html' title='Introduzione a java e generics parte 3 - Confronti tra element'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-1902197302022850248</id><published>2012-01-17T02:06:00.000-08:00</published><updated>2012-01-17T02:06:25.655-08:00</updated><title type='text'>Python Shapefile to CSV converter</title><content type='html'>This script exports the data content (tabular data) of a shapefile and the bounding box of every object to csv format&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;code java&quot;&gt;&lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;
Shapefile export
&quot;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; shapelib, dbflib, &lt;span class=&quot;kw3&quot;&gt;string&lt;/span&gt;
&amp;nbsp;
SHAPEFILE=&lt;span class=&quot;st0&quot;&gt;&quot;shpname&quot;&lt;/span&gt;
&amp;nbsp;
shp = shapelib.&lt;span class=&quot;me1&quot;&gt;ShapeFile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
dbf = dbflib.&lt;span class=&quot;me1&quot;&gt;DBFFile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
sCount = shp.&lt;span class=&quot;me1&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
dCount = dbf.&lt;span class=&quot;me1&quot;&gt;record_count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; sCount &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; dCount:
 &lt;span class=&quot;kw1&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Error: shape  number %s (%d) differs from  dbf records (%d) &quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;SHAPEFILE,sCount,dCount&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#print l&#39;header!&lt;/span&gt;
header = dbf.&lt;span class=&quot;me1&quot;&gt;read_record&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#print header.keys()&lt;/span&gt;
intestazione = &lt;span class=&quot;kw3&quot;&gt;string&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;header.&lt;span class=&quot;me1&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&quot;|&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
intestazione += &lt;span class=&quot;st0&quot;&gt;&quot;|XMIN|YMIN|XMAX|YMAX&quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; intestazione
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#read the dbf file &lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;dbf.&lt;span class=&quot;me1&quot;&gt;record_count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;:
 rc = dbf.&lt;span class=&quot;me1&quot;&gt;read_record&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 sc = shp.&lt;span class=&quot;me1&quot;&gt;read_object&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 row = &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; value &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; rc.&lt;span class=&quot;me1&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;:
  row += &lt;span class=&quot;st0&quot;&gt;&quot;%s|&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;co1&quot;&gt;#print the  extent/envelope&lt;/span&gt;
 &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; = sc.&lt;span class=&quot;me1&quot;&gt;extents&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 xmin = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 ymin = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 xmax = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
 ymax = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;
&amp;nbsp;
 row += &lt;span class=&quot;st0&quot;&gt;&quot;%f|%f|%f|%f&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;xmin,ymin,xmax,ymax&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; row
 &lt;span class=&quot;co1&quot;&gt;#print &quot;\n&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;clearer&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;user&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/1902197302022850248/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/python-shapefile-to-csv-converter.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1902197302022850248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/1902197302022850248'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/python-shapefile-to-csv-converter.html' title='Python Shapefile to CSV converter'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-8319277086220278902</id><published>2012-01-16T12:34:00.000-08:00</published><updated>2012-01-17T02:01:45.738-08:00</updated><title type='text'>Introduzione a java e generics parte 2 - Subtyping &amp; wildcard</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;level1&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 3px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Leggi l&#39;articolo aggiornato &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot;&gt;sul mio sito&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
In Java un tipo A è un sottotipo di un altro tipo B se questi sono legati da una clausola&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extends&lt;/b&gt;&amp;nbsp;o&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implements&lt;/b&gt;&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;A &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;extends&lt;/span&gt; B o A &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;implements&lt;/span&gt; B&lt;/pre&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-color: rgb(140, 172, 187); border-style: dashed; border-width: 1px; margin-bottom: 1em; overflow: auto; padding: 0.5em;&quot;&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; è sottotipo di &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ANumber+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Number&lt;/span&gt;&lt;/a&gt;, List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; è sottotipo di Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;
&amp;nbsp;
Subtyping è riflessiva e transitiva:
&amp;nbsp;
&lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//Se A è sottotipo di B allora B è supertipo di A//&lt;/span&gt;
&amp;nbsp;
Ogni tipo reference è sottotipo di &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; ed &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AObject+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Object&lt;/span&gt;&lt;/a&gt; è supertipo di ogni reference type&amp;nbsp;&lt;/pre&gt;
&lt;h2&gt;


Principio di sostituzione &lt;/h2&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-color: rgb(140, 172, 187); border-style: dashed; border-width: 1px; margin-bottom: 1em; overflow: auto; padding: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;interface&lt;/span&gt; Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
...
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;boolean&lt;/span&gt; add&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;E elem&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
...
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Principio di sostituzione: possiamo aggiungere Integer e Double a collezioni di Numbers (Integer e Double sono sottotipi di Number)&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; numeri = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt;
 ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
numeri.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
numeri.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt;
   numeri.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;[2, 3.14]&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
OK List&amp;lt;Number&amp;gt; è sottotipo di Collection&amp;lt;Number&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
OK 2 ha tipo* Integer che è sottotipo di Number&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
OK 3.14 ha tipo* Double che è sottotipo di Number&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Per ora tutto OK&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;Eccoci al dunque …&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Subtyping &amp;amp; wildcards&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;wildcard_con_extends&quot; name=&quot;wildcard_con_extends&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Wildcard con extends&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;interface&lt;/span&gt; Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
...
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;boolean&lt;/span&gt; addAll&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;
  Collection&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;extends&lt;/span&gt; E&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; c&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
...
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
OK, posso inserire in una collezione di tipo E elementi di tipo E&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
? extends E → OK, posso inserire in una collezione di tipo E elementi appartenenti ad una collezione di qualsiasi sottotipo di E&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; numeri = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; interi = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Double&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; doubles = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2.78&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
numeri.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;addAll&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;interi&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
numeri.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;addAll&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;doubles&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
OK Integer e Double sono sottotipi di Number&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
List&amp;lt;Integer&amp;gt; è sottotipo di List&amp;lt;? extends Number&amp;gt; (idem per Double)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code sql&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; interi &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt; Arrays.asList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;? extends Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; numeri &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt; interi;
numeri.&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;ADD&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;; // → Errore di compilazione
assert interi.toString&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;.equals&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;
   &lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;[1, 2, 3.14]&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
List&amp;lt;? extends Number&amp;gt; può essere una lista di qualsiasi tipo di numero! Non è detto che sia una lista di Double!&amp;nbsp;&lt;img alt=&quot;:-(&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_sad.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Wildcard con extends&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;wildcard_con_super&quot; name=&quot;wildcard_con_super&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;wildcard con super&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; copia&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;super&lt;/span&gt; T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; dest, List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;extends&lt;/span&gt; T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; src&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; i=&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt; src.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&amp;nbsp;
   dest.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;i,src.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// ← Attenzione&lt;/span&gt;
 &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;i style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;? super T → lista destinazione di supertipo di T&lt;/i&gt;&lt;/div&gt;
&lt;pre class=&quot;code sql&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Object&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; oggetti &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt; Arrays.&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Object&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;asList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3.14&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;four&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; interi &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt; Arrays.asList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
Collections.copia&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;oggetti, interi&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
assert oggetti.toString&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;.equals&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;[5, 6, four]&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;wildcard con super&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;get_and_put_principle&quot; name=&quot;get_and_put_principle&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Get and Put Principle&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
GET: Utilizzare il wildcard extends quando si deve solamente recuperare valori da una struttura&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
PUT: Utilizzare il wildcard super quando si deve solamente inserire dati in una struttura&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
GET and PUT: Non utilizzare i wildcard quando si deve sia prendere che inserire&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Get and Put Principle&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;eccezioni_al_get_put_principle&quot; name=&quot;eccezioni_al_get_put_principle&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Eccezioni al Get/Put principle&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
? extends E → è possibile inserire null&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
? super T → è possibile prelevare Object&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Eccezioni al Get/Put principle&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;sporco_trucco_di_programmazione&quot; name=&quot;sporco_trucco_di_programmazione&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Sporco trucco di programmazione&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; rebox&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;
   Box&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;extends&lt;/span&gt; Object&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; box&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
    reboxHelper&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;box&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;V&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; reboxHelper&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;Box&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;V&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; box&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
    box.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;box.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Viene effettuata una chiamata ad un “helper”&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;senza&lt;/b&gt;&amp;nbsp;wildcard&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Sporco trucco di programmazione&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;array&quot; name=&quot;array&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Array&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il subtyping degli array in java è covariante: S sottotipo di T → S[] sottotipo di T[]&amp;nbsp;&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Il codice seguente&amp;nbsp;&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;viene compilato&lt;/i&gt;&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; interi = 
   &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ANumber+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Number&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; numeri = interi&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
numeri&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// --&amp;gt; oops&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
ma attenzione che a runtime viene lanciato un errore&lt;/div&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;Exception in thread &quot;main&quot;
java.lang.ArrayStoreException: java.lang.Double
// numeri--&amp;gt; 1 2 3.14
&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Passiamo adesso ai generics&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;  interi= &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; numeri = interi&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; → non compila&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;!&lt;/span&gt;
numeri.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
il codice&amp;nbsp;&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;non compila&lt;/i&gt;&amp;nbsp;il Subtyping per i generics è controvariante: S supertipo di T → List&amp;lt;S&amp;gt; è sottotipo di List &amp;lt;? super T&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Array&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;covariante&quot; name=&quot;covariante&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Covariante&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;   
   S        ----- extends -----&amp;gt; T
   S[]      ----- extends -----&amp;gt; T[]

   String   ----- extends -----&amp;gt; Object
   String[] ----- extends -----&amp;gt; Object[]

&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Covariante&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;controvariante&quot; name=&quot;controvariante&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Controvariante&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;     S                ----- extends -----&amp;gt; T
     List&amp;lt;T&amp;gt;          ----- extends -----&amp;gt; List &amp;lt;? super S&amp;gt;

     String           ----- extends -----&amp;gt; Object
     List&amp;lt;Object&amp;gt;     ----- extends -----&amp;gt; List&amp;lt;? super String&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Controvariante&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;cattura_del_wildcard&quot; name=&quot;cattura_del_wildcard&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Cattura del wildcard&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Quando viene invocato un metodo generico il parametro di tipo deve essere scelto in modo da “combaciare” con il tipo rappresentato dal wildcard →&amp;nbsp;&lt;i style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;wildcard capture&lt;/i&gt;&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt;  &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; reverse&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; list&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; reverse&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; list&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?&amp;gt; è un sinonimo di &amp;lt;? extends Object&amp;gt;&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt;  &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; reverse&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; list&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; tmp = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt; list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;i, tmp.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; -i - &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
il seguente codice&amp;nbsp;&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;non compila&lt;/i&gt;&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; reverse&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; list&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Object&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; tmp = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Object&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt; list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; i++&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;i, tmp.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; -i - &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
errore di compilazione&lt;/div&gt;
&lt;pre class=&quot;code&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;The method set(int, capture#3-of ?) in the type List&amp;lt;capture#3-of ?&amp;gt; is not applicable for the arguments (int, Object)
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Cattura del wildcard&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;restrizioni_del_wildcard&quot; name=&quot;restrizioni_del_wildcard&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Restrizioni del wildcard&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Creazione dell&#39;istanza&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Chiamata a metodo generico&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Supertipo&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Restrizioni del wildcard&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;creazione_dell_istanza&quot; name=&quot;creazione_dell_istanza&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Creazione dell&#39;istanza&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; l = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
   NO&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;!&lt;/span&gt; Errore di compilazione
&amp;nbsp;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;super&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ANumber+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Number&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;  s = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Number&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; 
  OK&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Creazione dell&#39;istanza&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;chiamata_a_metodo_generico&quot; name=&quot;chiamata_a_metodo_generico&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Chiamata a metodo generico&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Lista &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;factory&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; .. &lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;OK&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; l = Lista.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;factory&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; OK
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; l2 = Lista.&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Object&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;factory&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; OK
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; l3 = Lista.&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt;factory&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; → ERRORE
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; l4 = Lista.&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&amp;gt;&lt;/span&gt;factory&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; OK&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Chiamata a metodo generico&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;





&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;supertipo&quot; name=&quot;supertipo&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Supertipo&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;Class&lt;/span&gt; Lista &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;extends&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;…&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; → NO
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;Class&lt;/span&gt; Lista2 &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;implements&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;…&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; → NO
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;Class&lt;/span&gt; List3  &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;implements&lt;/span&gt;  ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;…&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt; → OK&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:subtiping_wildcards&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Supertipo&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;div id=&quot;___plusone_0&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; display: inline-block; float: none; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 1px; height: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline; width: 450px;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/8319277086220278902/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-e-generics-subtyping.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/8319277086220278902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/8319277086220278902'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-e-generics-subtyping.html' title='Introduzione a java e generics parte 2 - Subtyping &amp; wildcard'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265685944548777967.post-2292391662177849299</id><published>2012-01-16T12:17:00.000-08:00</published><updated>2012-01-17T02:00:35.752-08:00</updated><title type='text'>Introduzione a java generics  Parte 1 - Alcune novità rispetto a java 1.4</title><content type='html'>&lt;br /&gt;
&lt;h1 style=&quot;background-color: white; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 21px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em; text-align: justify;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;introduzione_a_java_generics&quot; name=&quot;introduzione_a_java_generics&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;alcune_novita_rispetto_a_java_1.4&quot; name=&quot;alcune_novita_rispetto_a_java_1.4&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; name=&quot;alcune_novita_rispetto_a_java_1.4&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 3px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; name=&quot;alcune_novita_rispetto_a_java_1.4&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; name=&quot;alcune_novita_rispetto_a_java_1.4&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Pagina in costruzione. Questa pagina è una rielaborazione, fatta prevalentemente di copia&amp;amp;incolla, delle slide relative ai generics disponibili sulla&amp;nbsp;&lt;/a&gt;&lt;a class=&quot;wikilink1&quot; href=&quot;http://www.flaviocdc.net/wiki/java:generics:start&quot; style=&quot;color: rgb(0, 153, 0) !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; title=&quot;java:generics:start&quot;&gt;pagina dedicata&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Leggi l&#39;articolo aggiornato &lt;a href=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot;&gt;sul mio sito&lt;/a&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Alcune novità rispetto a java 1.4&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;cominciamo&quot; name=&quot;cominciamo&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Cominciamo&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Generics e Collections vanno a braccetto con altre nuove feature (introdotte da Java5):&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
boxing e unboxing;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
nuovo ciclo for;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
funzioni che accettano un numero variabile di argomenti.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
La loro combinazione è sinergica: l&#39;intero è maggiore della somma delle parti!&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Cominciamo&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;versione_cool&quot; name=&quot;versione_cool&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Versione &quot;cool&quot;&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; ints = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; s = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; n : ints&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
s += n&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; s == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Probabilmente il codice è comprensibile anche senza alcuna spiegazione …&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; ints =
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
List ed ArrayList sono parte del CollectionFramework. List è generico: è possibile scrivere List&amp;lt;E&amp;gt; per indicare liste contenenti elementi di tipo E. List&amp;lt;Integer&amp;gt; indica liste contenenti elementi di tipo Integer.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Boxing ed unboxing automagicamente applicati.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il metodo statico Arrays.asList prende un numero variabile di argomenti.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; n : ints&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
s += n&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Ciclo foreach: permette di associare ad una variabile i valori contenuti in un oggetto iterabile. Ad ogni iterazione si prende l&#39;elemento successivo&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; s == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Lo statement assert permette di controllare che l&#39;asserzione fatta sia corretta …&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Asserzione vera&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
AssertionError&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
… disabilitate di default …&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Versione cool&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;versione_old_fashion&quot; name=&quot;versione_old_fashion&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Versione old fashion&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AList+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;List&lt;/span&gt;&lt;/a&gt; ints = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;,
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;,
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; s = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AIterator+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Iterator&lt;/span&gt;&lt;/a&gt; it = ints.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;iterator&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; it.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;hasNext&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; n = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;it.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;intValue&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
s += n&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;s == &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il precedente codice è meno leggibile del primo&amp;nbsp;&lt;img alt=&quot;:-(&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_sad.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Senza i generics non è possibile indicare che tipo di elementi vogliamo inserire nella lista sono necessari dei cast&amp;nbsp;&lt;img alt=&quot;:-(&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_sad.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Senza boxing ed unboxing è necessario eseguire manualmente la conversione esempio: .intValue()&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Senza funzioni ad argomenti variabili è necessario passare alla asList un array “preimpostato”&amp;nbsp;&lt;img alt=&quot;:-(&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_sad.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Senza il ciclo foreach è necessario istanziare un iteratore per scandire la lista&amp;nbsp;&lt;img alt=&quot;:-(&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_sad.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
.. Si c&#39;è anche un altro modo …&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Versione old fashion&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;genericsbase&quot; name=&quot;genericsbase&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Generics: Base&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Una classe o interfaccia può dichiarare di ricevere uno o più parametri di tipo:&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Sono scritti tra parentesi angolate (&amp;lt;T&amp;gt;)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I tipi attuali devono essere forniti&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
quando si dichiara una variabile&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
quando si istanzia un oggetto&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AList+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;List&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; words = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
words.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;Hello &quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
words.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;world !&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; s = words.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; + words.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; s.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;Hello world !&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
La classe ArrayList&amp;lt;E&amp;gt; implementa l&#39;interfaccia List&amp;lt;E&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
words è una lista contenente stringhe&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Vengono inserite due stringhe e successivamente vengono recuperate&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
… tutto senza cast!&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Codice senza l&#39;ausilio dei generics …&lt;/div&gt;
&lt;pre class=&quot;code sql&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List words &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt; new ArrayList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
words.&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;ADD&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;Hello &quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
words.&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;ADD&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;world !&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
String s &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;String&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;words.get&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;String&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;words.get&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;
assert s.equals&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;Hello world !&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Generics: Base&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;type_erasure&quot; name=&quot;type_erasure&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Type erasure&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il bytecode compilato dei due precedenti esempi è (grossomodo) identico → retro compatibilità. I generics sono implementati tramite la type erasure&lt;/div&gt;
&lt;table class=&quot;inline&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; background-color: white; border-collapse: collapse; font-size: 13px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;tbody style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;tr class=&quot;row0&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;th class=&quot;col0&quot; style=&quot;background-color: #dee7ec; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;compile time&lt;/th&gt;&lt;th class=&quot;col1&quot; style=&quot;background-color: #dee7ec; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;run time&lt;/th&gt;&lt;/tr&gt;
&lt;tr class=&quot;row1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&amp;lt;Integer&amp;gt;&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&amp;lt;String&amp;gt;&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row3&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&amp;lt;List&amp;lt;String»&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row4&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;…&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;…&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I generics eseguono&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;implicitamente&lt;/b&gt;&amp;nbsp;il cast che deve essere esplicitato nella versione senza generics&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Cast-iron guarantee: I cast impliciti aggiunti dalla compilazione dei generics non falliscono mai!(*)&amp;nbsp;&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;(*) si applica esclusivamente al caso in cui non vengano inviati dal compilatore dei “unchecked warnings”&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Type erasure, come mai?&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Semplicità → il bytecode è identico&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Dimensioni → c&#39;è solo una classe List&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Evoluzione → il bytecode (*) è retro compatibile e le librerie con e senza generics possono coesistere&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
E&#39; possibile evolvere il proprio codice “con calma e con pazienza”&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
(*) Solo se ricompilato per versioni vecchie di java&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Generics VS C++ Template&lt;/div&gt;
&lt;table class=&quot;inline&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; background-color: white; border-collapse: collapse; font-size: 13px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;tbody style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;tr class=&quot;row0&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;th class=&quot;col0&quot; style=&quot;background-color: #dee7ec; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Java&lt;/th&gt;&lt;th class=&quot;col1&quot; style=&quot;background-color: #dee7ec; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;C++&lt;/th&gt;&lt;/tr&gt;
&lt;tr class=&quot;row1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&amp;lt;List&amp;lt;String»&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;List&amp;lt; List&amp;lt;String&amp;gt; &amp;gt; (con lo spazio!)&amp;nbsp;&lt;img alt=&quot;:-(&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_sad.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Type erasure: una sola versione della classe&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Expansion: n versioni della solita classe; una per ogni tipo definito a compile-time → code bloat&amp;nbsp;&lt;img alt=&quot;:-(&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_sad.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;(?ottimizzazioni?)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Type erasure&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;tipi_reference&quot; name=&quot;tipi_reference&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Tipi reference&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Classi&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Istanze&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Array (tutti)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Possono assumere il valore null&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Sono tutti fgli di Object&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Tipi reference&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;tipi_primitivi&quot; name=&quot;tipi_primitivi&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Tipi primitivi&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
8 tipi primitivi hanno un corrispondente “tipo reference” nel package java.lang&lt;/div&gt;
&lt;table class=&quot;inline&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; background-color: white; border-collapse: collapse; font-size: 13px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;tbody style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;tr class=&quot;row0&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;th class=&quot;col0&quot; style=&quot;background-color: #dee7ec; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Primitivo&lt;/th&gt;&lt;th class=&quot;col1&quot; style=&quot;background-color: #dee7ec; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Reference&lt;/th&gt;&lt;/tr&gt;
&lt;tr class=&quot;row1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;byte&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Byte&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row2&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;short&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Short&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row3&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;int&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Integer&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row4&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;long&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Long&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row5&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;float&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Float&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row6&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;double&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Double&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row7&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;bool&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Boolean&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;row8&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;td class=&quot;col0&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;char&lt;/td&gt;&lt;td class=&quot;col1&quot; style=&quot;border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Character&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Tipi primitivi&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;boxing_e_unboxing&quot; name=&quot;boxing_e_unboxing&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Boxing e unboxing&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Boxing → conversione da primitivo a reference&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Unboxing → conversione da reference a primitivo&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
La conversione viene fatta in automatico&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; e → &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;e&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// boxing&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; e → e.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;intValue&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// unboxing&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Esempi&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// OK&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; somma&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; ints&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; s = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; n :ints&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; s += n &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; s&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//Troppe conversioni! Performance :-(&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; sommaInteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; ints&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; s = &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt; n :ints&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt; s += n &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; s&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Boxing e unboxing&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;binary_numeric_promotion&quot; name=&quot;binary_numeric_promotion&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Binary Numeric Promotion&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Se uno degli operandi è un reference type viene applicato l&#39;&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;unboxing&lt;/i&gt;. Poi&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Se uno degli operandi è double anche l&#39;altro viene promosso a double&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Se uno degli operandi è foat anche l&#39;altro viene promosso a foat&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Se uno degli operandi è long anche l&#39;altro viene promosso a long&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Altrimenti entrambi vengono promossi a int&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Si applica a vari operatori binari ( tra cui == )&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Binary Numeric Promotion&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;pericolo_boxing_uboxing&quot; name=&quot;pericolo_boxing_uboxing&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Pericolo boxing/uboxing&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Per i primitivi == signifca “uguaglianza dei valori”&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Per i reference == signifca “stessa identità”&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;L ist&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; bigs =
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;100&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; sommaInteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;bigs&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; == somma&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;bigs&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; sommaInteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;bigs&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;!&lt;/span&gt;=
sommaInteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;bigs&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// non raccomandato&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I generics funzionano solo con i reference&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Interi da -128 a 127, caratteri da 0 a \u007f, Byte e Boolean possono essere cachati&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; smalls = &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AArrays+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;asList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; sommaInteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;smalls&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;
  == somma&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;smalls&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// 6&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;assert&lt;/span&gt; sommaInteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;smalls&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;
  == sommaInteger&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;smalls&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;// 6, non raccomandato&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Posso assegnare null ad un primitivo? → NO&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Pericolo boxing/uboxing&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: inherit; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; clear: left; font-size: 19px; margin-bottom: 1em; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;due_paroline_sul_ciclo_foreach&quot; name=&quot;due_paroline_sul_ciclo_foreach&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Due paroline sul ciclo foreach&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot; style=&quot;margin-bottom: 0px; margin-left: 43px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
For (Pippo p: pippi) …&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Applicabile a istanze di java.lang.Iterable&amp;lt;T&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Applicabile ad array[]&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Esegue in automatico eventuali boxing ed unboxing&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw4&quot; style=&quot;color: #993333; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; ints = &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt; i :ints&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;
&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ASystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Due paroline sul ciclo foreach&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;metodi_generici&quot; name=&quot;metodi_generici&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Metodi generici&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt; Lists &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; toList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;T&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; arr&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; list = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;T elem: arr&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;elem&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; list&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
...&lt;/pre&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Il metodo toList accetta un array di tipo T[] e ritorna un List&amp;lt;T&amp;gt; per ogni tipo T&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Si deve indicare &amp;lt;T&amp;gt; all&#39;inizio della frma del metodo statico&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
T è un parametro di tipo&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Ogni metodo che dichiara un parametro di tipo è un metodo generico&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; ints = Lists.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;toList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInteger+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; strings = Lists.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;toList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot; style=&quot;color: #436976; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066; margin: 0px; padding: 0px;&quot;&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;mondo&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Boxing e unboxing gratuiti!&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Metodi generici&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;varargs&quot; name=&quot;varargs&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Varargs&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Che noia inserire gli elementi nell&#39;array!&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; toList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;T ... &lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; list = &lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;T&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;T elem: arr&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt; list.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;elem&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt; list&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;
...
&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; ints = Lists.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;toList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;
List&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt; strings = Lists.&lt;span class=&quot;me1&quot; style=&quot;color: #006600; margin: 0px; padding: 0px;&quot;&gt;toList&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;ciao&quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;mondo&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Abbiamo sostituito&lt;/div&gt;
&lt;ul style=&quot;color: #638c9c; line-height: 1.5em; list-style-image: none; list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
T[] con T …&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;li&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
L&#39;array[] con valori separati da virgola&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Qualsiasi numero di argomenti può precedere il vararg,&amp;nbsp;&lt;i class=&quot;u&quot; style=&quot;font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;niente deve seguire il vararg&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;:!:&quot; class=&quot;middle&quot; src=&quot;http://www.flaviocdc.net/wiki/lib/images/smileys/icon_exclaim.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; /&gt;&amp;nbsp;Attenzione! Il tipo T non viene sempre dedotto dal compilatore, a volte è necessario esplicitarlo&lt;/div&gt;
&lt;pre class=&quot;code java&quot; style=&quot;background-color: #f7f9fa; border-bottom-color: rgb(140, 172, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(140, 172, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;Lists.&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;Object&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;toList&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;st0&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;&quot;mondo&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Non è detto che Integer e String abbiano in comune solo Object! (Serializable, Comprarable, …)&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;secedit&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;form action=&quot;http://www.flaviocdc.net/wiki/java:generics:alcune_novita_rispetto_a_java_1.4&quot; class=&quot;button btn_secedit&quot; method=&quot;post&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div class=&quot;no&quot; style=&quot;display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;input class=&quot;button&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.flaviocdc.net/wiki/lib/tpl/flavio/images/buttonshadow.png); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(140, 172, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(140, 172, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(140, 172, 187); border-top-style: solid; border-top-width: 1px; color: black; cursor: pointer; display: inline; float: right; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: middle;&quot; title=&quot;Varargs&quot; type=&quot;submit&quot; value=&quot;Modifica&quot; /&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: inherit; border-bottom-color: rgb(140, 172, 187); border-bottom-style: solid; border-bottom-width: 1px; clear: left; font-size: 20px; font-weight: normal; margin-bottom: 1em; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;&quot;&gt;


&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5265685944548777967&quot; id=&quot;asserzioni&quot; name=&quot;asserzioni&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none !important;&quot;&gt;Asserzioni&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot; style=&quot;margin-bottom: 0px; margin-left: 23px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Possono essere abilitate tramite i fag della JVM&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;-ea&lt;/b&gt;&amp;nbsp;o&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;-enableassertions&lt;/b&gt;&amp;nbsp;Altrimenti stanno a dormire …&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flaviocdc-software-developer.blogspot.com/feeds/2292391662177849299/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-generics-alcune.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/2292391662177849299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265685944548777967/posts/default/2292391662177849299'/><link rel='alternate' type='text/html' href='http://flaviocdc-software-developer.blogspot.com/2012/01/introduzione-java-generics-alcune.html' title='Introduzione a java generics  Parte 1 - Alcune novità rispetto a java 1.4'/><author><name>Flavio</name><uri>http://www.blogger.com/profile/00059832244666771185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNewKv5W3aExr2ob1JDmQipYrz_xPQKwn95zUBG-5Kl1_SB3srQ-K7fuJ7_LxklnD7B1EpodMWmc2NJzWDHXG7E5wIHzKAYj0ojAaK-qJUiYh7EgUvQ8Ulo7MX7BdPe0/s220/avatar_999e313827c4_64.png'/></author><thr:total>0</thr:total></entry></feed>