首页 > TAG信息列表 > 丫丫

for循环外定义对象(变量)和for循环里定义对象(变量)的区别

外边: package com.sky.demo; import java.util.ArrayList; public class Test { public static void main(String[] args) { User user = new User(); ArrayList<User> list = new ArrayList<User>(); for (int i = 0