码迷,mamicode.com
首页 > 编程语言 > 详细

Java-idea-生成for循环

时间:2017-04-07 14:43:50      阅读:744      评论:0      收藏:0      [点我收藏+]

标签:ret   code   more   cee   details   exception   cat   art   rpc   

itar 生成array for代码块 

for (int i = 0; i < array.length; i++) {  
             = array[i];  
}  

itco 生成Collection迭代  

for (Iterator<String> iterator = locationUrl.iterator(); iterator.hasNext(); ) {  
            String next =  iterator.next();  
}  

iten 生成enumeration遍历 

while (enumeration.hasMoreElements()) {  
            Object nextElement =  enumeration.nextElement();  
}  

iter 生成增强forxun 

for (String s : locationUrl) {  
              
}  

itit  生成iterator 迭代 

while (iterator.hasNext()) {  
                Object next =  iterator.next();  
                  
}  

itli 生成List的遍历

for (int i = 0; i < locationUrl.size(); i++) {  
            String s =  locationUrl.get(i);  
              
}    

ittok 生成String token遍历

for (StringTokenizer stringTokenizer = new StringTokenizer(TVSOU_URL); stringTokenizer.hasMoreTokens(); ) {  
            String s = stringTokenizer.nextToken();  
              
}  

itve 生成Vector数组迭代 

for (int i = 0; i < vector.size(); i++) {  
            Object elementAt =  vector.elementAt(i);  
              
}  

另外两个和循环无关,只是方便创建

 itaws 生成Axis2 web service调用 

try {  
            MyServiceStub stub = new MyServiceStub();  
            stub.sayHelloWorldFrom();  
        } catch (Exception ex) {  
            ex.printStackTrace();  
        }  

itws 生成 Axis web service调用 

try {  
            MyServiceLocator locator = new MyServiceLocator();  
            Activator service = locator.get();  
            // If authorization is required  
            //((MyService_Soap_BindingStub)service).setUsername("user3");  
            //((MyService_Soap_BindingStub)service).setPassword("pass3");  
            // invoke business method  
            service.businessMethod();  
        } catch (javax.xml.rpc.ServiceException ex) {  
            ex.printStackTrace();  
        } catch (java.rmi.RemoteException ex) {  
            ex.printStackTrace();  
        }  

具体如图: 

技术分享

原文地址:http://blog.csdn.net/hdchenyue/article/details/52300473

Java-idea-生成for循环

标签:ret   code   more   cee   details   exception   cat   art   rpc   

原文地址:http://www.cnblogs.com/bjlhx/p/6677949.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!