posts - 9,  comments - 11,  trackbacks - 0
    static <T> Vector<T> join(Vector<T> c1, Vector<T> c2)
    
{
        Vector
<T> result;
        
if (c1 == null{
            result 
= c2;
        }
 else if (c2 == null{
            result 
= c1;
        }
 else {
            result 
= new Vector<T>();
            result.addAll(c1);
            result.addAll(c2);
            
//Collections.sort(result);
        }

        
return result;
    }


Java的泛型真是玩具,在注释那里推导不出类型来了……
posted on 2009-06-23 01:22 lingol 阅读(230) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2009年6月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

留言簿(5)

随笔档案

文章档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜