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 阅读(254) 评论(0)  编辑 收藏 引用
<2009年11月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

留言簿(5)

随笔档案

文章档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜