1设计一个程序要求实现使用叠代器完成对集合的遍历
2使用gui和监听器计数完成1+1=2

解决方案 »

  1.   

    public class Person
    {
      public static void mian(String args[]){
       ArrayList arr=new ArrayList();
       arr.add("张三");
       arr.add("李四");
       arr.add("王五");
       for(Iterator it=arr.iterator();it.hasNext();)
       {
           System.out.println(it.next());
       }   }
    }
    果然是小程序,(。。)
      

  2.   

    int Find(int array[], int  length, int value)  
    {  
        if(NULL == array || 0 == length)  
            return -1;  
      
        for(int index = 0; index < length; index++){  
            System.out.println(array[index]);
            // 查找
            //if(value == array[index])  
            //    return index;  
            }  
        return -1;  
    }  
      

  3.   

    第一个是小之又小,
    第二个对我有难度,没用java搞过gui--------------------
    http://www.qinglobo.com/qklist-4.htm