很急啊,两个小程序,求答案啊
1设计一个程序要求实现使用叠代器完成对集合的遍历2使用gui和监听器计数完成1+1=2
--------------------编程问答-------------------- 百度上一搜一堆的。 --------------------编程问答-------------------- 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());
}
}
}
果然是小程序,(。。) --------------------编程问答-------------------- 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;
} --------------------编程问答-------------------- 第一个是小之又小,
第二个对我有难度,没用java搞过gui
--------------------
http://www.qinglobo.com/qklist-4.htm
补充:Java , Java SE