惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
博客园 - 三生石上(FineUI控件)
V
V2EX
有赞技术团队
有赞技术团队
V
Visual Studio Blog
小众软件
小众软件
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
量子位
T
Tailwind CSS Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Cisco Talos Blog
Cisco Talos Blog
I
Intezer
Project Zero
Project Zero
A
Arctic Wolf
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
L
Lohrmann on Cybersecurity
S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Tor Project blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Security @ Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
G
GRAHAM CLULEY
Help Net Security
Help Net Security
N
News | PayPal Newsroom
W
WeLiveSecurity
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
C
Check Point Blog

博客园 - Ring

运行Java cmd程序 找不到或无法加载主类怎么解决 Generics and Collection (2) mybatis, spring, springmvc 什么时候该用NoSQL? 如何学习Javascript 好文章尽收眼底 事务和锁 索引 VS调试Javascript. Asp.net常用状态管理方案分析 .NET中的缓存知识总结 "The server has rejected the client credentials"解决方案 - Ring 有关IIS7概述以及配置和开发的几篇文章摘录 CodeForFun--编写自动登录Email的程序 是什么使得我的进程崩溃了? OutOfMemory这家伙是谁?为什么我还留有许多内存,它却使进程崩溃了? ASP.NET 崩溃-SiteMap中疯狂的循环 何时.NET中AppDomain会回收? .NET如何使用内存---餐馆案例分析
Generics and Collection (1)
Ring · 2015-05-02 · via 博客园 - Ring
 1 public static void main(String args[]) {
 2         List ints = Arrays.asList(new Integer[]{new Integer(1), new Integer(3)});
 3         int s =0;
 4         for(Iterator it = ints.iterator(); it.hasNext();)
 5         {
 6             int n = ((Integer)it.next()).intValue();
 7             s+=n;
 8         }
 9         System.out.println(s);
10     }
public static void main(String args[]) {
        List<Integer> ints = Arrays.asList(1,2,3);
        int s = 0;
        for(int n: ints)
        {
            s+=n;
        }
        System.out.println(s);
    }
public static void main(String args[]) {
        List<String> words = new ArrayList<String>();
        words.add("Hello");
        words.add("world");
        String s = words.get(0) +words.get(1);        
        System.out.println(s);
    }
package cn.galc.test;

import java.util.*;
 
class Lists{
    public static <T> List<T> toList(T[] arr)
    {
        List<T> list = new ArrayList<T>();
        for (T t: arr)
        {
            list.add(t);
        }
        return list;
    }
}
 
public class Test {     
    public static void main(String args[]) {
        List<String> words = Lists.toList(new String[]{"sun","ming"});
        for(String s:words)
            System.out.println(s);
    }
}