如题所述
为什么我这样写会有warning:The value of the local variable products is not used呢?ArrayList products = new ArrayList();
这是编译器警告,告诉你变量没有被使用。不应该声明一个不被使用的变量。就像不该买个什么用都没有的东西一样。