package person.example;
import java.util.ArrayList;
import java.util.List;
/*
* 基本迭代:0~100个数字相加之和
*
*/
public class FirstClass {
static int sum = 0;
public static void main(String[] args) {
List<String> list = new ArrayList<String>();
for (int i = 0; i < 100; i++) {
list.add(String.valueOf(i));
}
System.out.println(addMethod(list));
}
public static int addMethod(List list) {
import java.util.ArrayList;
import java.util.List;
/*
* 基本迭代:0~100个数字相加之和
*
*/
public class FirstClass {
static int sum = 0;
public static void main(String[] args) {
List<String> list = new ArrayList<String>();
for (int i = 0; i < 100; i++) {
list.add(String.valueOf(i));
}
System.out.println(addMethod(list));
}
public static int addMethod(List list) {