<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>系列 on 庞玉栋个人博客</title><link>https://pangyd.com/tags/%E7%B3%BB%E5%88%97/</link><description>Recent content in 系列 on 庞玉栋个人博客</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sun, 08 Oct 2017 20:15:22 +0800</lastBuildDate><atom:link href="https://pangyd.com/tags/%E7%B3%BB%E5%88%97/index.xml" rel="self" type="application/rss+xml"/><item><title>Java总结篇系列：Java泛型</title><link>https://pangyd.com/post/128-java-java/</link><pubDate>Sun, 08 Oct 2017 20:14:45 +0800</pubDate><guid>https://pangyd.com/post/128-java-java/</guid><description>&lt;p>首先，我们看下下面这段简短的代码:&lt;/p>&lt;p>&lt;br>&lt;/p>&lt;p>public class GenericTest { &amp;nbsp; &amp;nbsp;public static void main(String[] args) {&lt;/p>&lt;p>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List list = new ArrayList();&lt;/p>&lt;p>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list.add("qqyumidi");&lt;/p>&lt;p>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list.add("corn");&lt;/p>&lt;p>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list.add(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; list.size(); i++) {&lt;/p>&lt;p>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String name = (String) list.get(i); // 1&lt;/p>&lt;p>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println("name:" + name);&lt;/p>&lt;p>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p></description></item></channel></rss>